<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2462.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; I've erased the code, but... 
weren't they doing that in a function?</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=jgordon@directfile.com href="mailto:jgordon@directfile.com">Josiah 
  Gordon</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu 
  href="mailto:javascript@LaTech.edu">javascript@LaTech.edu</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, July 09, 2001 2:56 PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Javascript] wrox code 
  question</DIV>
  <DIV><BR></DIV>Carl,<BR><BR>&gt; why does the indicated number NOT change when 
  the page is refreshed.<BR><BR>They are making a rather careless mistake. They 
  are setting the value of an<BR>input before it exists. This *sometimes* works, 
  but really shouldn't.<BR><BR>They are using an in-line script so that they can 
  render the question HTML<BR>randomly when the page loads, but are setting the 
  value of txtQNumber before<BR>they have written the HTML that creates that 
  input.<BR><BR>Instead, the value of the input should be set when the page 
  loads (although,<BR>there are several ways that the same thing can be 
  accomplished):<BR><BR>&lt;BODY 
  onLoad="javascript:document.QuestionForm.txtQNumber.value =<BR>questionNumber 
  + 1"&gt;<BR><BR>Try putting that line in your code. Without any other changes, 
  the page will<BR>work fine.<BR><BR><BR>--Josiah Gordon<BR>---<BR>Outgoing mail 
  is certified Virus Free.<BR>Checked by AVG anti-virus system (<A 
  href="http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: 6.0.264 
  / Virus Database: 136 - Release Date: 
  7/2/2001<BR><BR><BR>_______________________________________________<BR>Javascript 
  mailing list<BR><A 
  href="mailto:Javascript@LaTech.edu">Javascript@LaTech.edu</A><BR><A 
  href="http://www.LaTech.edu/mailman/listinfo/javascript">http://www.LaTech.edu/mailman/listinfo/javascript</A><BR></BLOCKQUOTE></BODY></HTML>