Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > javascript cycling graphic does not work on MAC IE

Reply
Thread Tools

javascript cycling graphic does not work on MAC IE

 
 
robbiehenry@gmail.com
Guest
Posts: n/a
 
      09-20-2005
1. robbiehe...@gmail.com Sep 19, 1:48 pm show options

From: robbiehe...@gmail.com - Find messages by this author
Date: Mon, 19 Sep 2005 10:48:50 -0700
Local: Mon, Sep 19 2005 1:48 pm
Subject: javascript cycling graphic does not work on MAC IE
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse

I built this page for my company's corporate website
(http://www.otpp.com/web/website.nsf/...uates&students)


The second graphic down in the content area is a cycling graphic. Upon
page reload one of 3 banner graphics randomly loads on the page.


I works on all browsers that i can get my hands on for pc and mac
except ie for mac.


Can someone help me to figure out why it doesn't work and provide a
solution for me?


Thanks


Here is the code


jsheader:
<script language="Javascript" type="text/javascript">
<!-- Hide script from old browsers


myPix = new
Array("../web/bennertestimonial/$FILE/bennertestimonial.jpg","../web/cheung*testimonial/$FILE/cheungtestimonial.jpg","../web/ttrottestimonial/$FILE/ttr*ottestimonial.jpg")

imgCt = myPix.length


function choosePic() {
if (document.images) {
randomNum = Math.floor((Math.random() * imgCt))
document.myPicture.src = myPix[randomNum]



}
}


// End hiding script from old browsers -->
</script>

body tag:
onload="choosePic()"


image tag:
<img src="../web/spacer/$FILE/spacer.gif" width="565" height="177"
alt="" border="0" name="myPicture">

 
Reply With Quote
 
 
 
 
Sandman
Guest
Posts: n/a
 
      09-20-2005
In article <. com>,
wrote:

> The second graphic down in the content area is a cycling graphic. Upon
> page reload one of 3 banner graphics randomly loads on the page.
>
>
> I works on all browsers that i can get my hands on for pc and mac
> except ie for mac.



Is IE for Mac important to you? It's ancient, and practically no one uses it
anymore.

--
Sandman[.net]
 
Reply With Quote
 
 
 
 
Christopher Benson-Manica
Guest
Posts: n/a
 
      09-20-2005
Sandman <> wrote:

> Is IE for Mac important to you? It's ancient, and practically no one uses it
> anymore.


Unfortunately (for me at least), there are still people running Mac OS
9 and below using IE 5.1.7; they occasionally bring its bloated
carcass to our website, and I have to step carefully around its
innumerable stupid quirks. Whether one wishes to cater to the
wretched souls still running these browsers is a matter of personal
taste, but they do exist.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
 
Reply With Quote
 
Stephen Chalmers
Guest
Posts: n/a
 
      09-20-2005
<> wrote in message news: ups.com...

>I works on all browsers that i can get my hands on for pc and mac
>except ie for mac.


I assume js and error reporting were enabled.

When you reference an image, it's safer to do so via document.images
but that may not be the problem.

I suggest alerting the length of the array, the value returned by
Math.random and the resolved source path:

function choosePic()
{
if (document.images)
{
randomNum = Math.floor((Math.random() * imgCt))

alert("myPix.length: "+myPix.length+'\n\nrandomNum: ' + randomNum +"\n\nsrc=" + myPix[randomNum]);

document.images['myPicture'].src = myPix[randomNum];
}
}

--
S.C.





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to mouseover a GRAPHIC . . . that launches another (freestanding) GRAPHIC (ie. when flash is _not_ available)? 50 SOMETHING GAL HTML 3 12-10-2006 01:10 AM
mac using a microphone does not work in java kal Java 1 08-31-2006 02:10 AM
mac findertools restart() does not work? nate Python 0 06-26-2006 05:45 PM
Re: (please note: this does not work on a Mac) Bruce Grubb HTML 0 04-27-2004 02:44 PM
javascript bookmark doesn't work in IE/Win (but does IE/Mac, Moz) Jeffrey Friedl Javascript 0 01-18-2004 09:48 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57