[Javascript] wrox code question
Rodney Myers
rodney at aflyingstart.net
Mon Jul 9 14:53:10 CDT 2001
"Every day brings new surprises" : ER
I found that the number DID change in NN4.7 and did NOT change in IE5.5
although alerts of the base expression :
javascript:alert(Math.floor(Math.random() * (questions.length)))
Perplexing, but I have to move on.
I don't have that book, but if I had to guess the intent it would be
something like "Let us show you just how horrible your code can be if
you don't learn how to use objects." <g>
This won't help much, but maybe another time....
Welcome to the list
Rodney
Peter Brunone wrote:
> Carl, Cutting and pasting this code, I don't have a problem
> getting the correct number to show up with a question. Now, I'm using
> IE6, but I can't imagine changing the structure of the language
> between browser versions like that (especially since JS has been
> pretty standardized for a few years now).
>
> ----- Original Message -----
> From: carl
> To: javascript at LaTech.edu
> Sent: Monday, July 09, 2001 2:29 PM
> Subject: [Javascript] wrox code question
> Sorry if this has been beaten up before, but I am working
> through the Wrox Beginning Javascript book, and have one
> thing that I dont understand (well, more than one thing, but
> only one question here) the code, from their site,
> is <snip/> this is from chapter 6, if anyone has the book
> and wants to read about the intent of the page. My question
> is: the number that appears in the text box at the top of
> the page is correct the first time the page is loaded, but
> no matter how many times I reload the number stays the
> same. Different questions from the question array do
> appear, and an alert shows that the value of questionNumber
> does change at random.Q: why does the indicated number NOT
> change when the page is refreshed. This happens in IE 4 and
> 5.5, have not tried on a Netscape machine. Thanks, looking
> forward to a lot of learning from the list, hoping to
> contribute something useful someday
>
--
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/
Enquiries regarding Shop at ssistant Classic training :
Call 01256 880770
Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions
More information about the Javascript
mailing list