<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>innerHTML</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>For those who are interested I solved the problem 
by first creating an object "varlist" and then dynamically adding properties to 
the object.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&lt;html&gt;&lt;head&gt;<BR>&lt;SCRIPT 
LANGUAGE="JavaScript1.2"&gt;<BR>&lt;!--<BR>var varlist = new 
Object(Object);<BR>// 
--&gt;<BR>&lt;/SCRIPT&gt;<BR>&lt;/head&gt;&lt;body&gt;<BR>&lt;A HREF=# 
onclick='Javascript:eval("varlist.prototype.newvar=11");'&gt;create variable 
"newvar"&lt;/A&gt;&lt;BR&gt;<BR>&lt;A HREF=# 
onclick='Javascript:alert("varlist.newvar="+varlist.newvar);'&gt;view&nbsp; 
"newvar"&lt;/A&gt;<BR>&lt;/body&gt;&lt;/html&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Lau</FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A href="mailto:lau@goldenweb.com.au" title=lau@goldenweb.com.au>Lau</A> 
</DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  href="mailto:javascript@LaTech.edu" 
  title=javascript@LaTech.edu>javascript@LaTech.edu</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, August 23, 2001 6:06 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] dynamically 
  creating variables using eval()</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>How can I dynamically create a new javascript 
  variable that will be available to subsequent scripts.</FONT></DIV>
  <DIV><FONT face=Arial size=2>I can use eval("var newvar;newvar=33;") to create 
  the variable, but the new variable only seems to exist within the scope of the 
  script block that it was created in. Below is a page that demonstrates what I 
  mean... the first alert works, the second one says that newvar is 
  undefined.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial 
  size=2>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;<BR>&lt;A HREF=# 
  onclick='Javascript:eval("var newvar;newvar=33;");alert(newvar);'&gt;create 
  variable "newvar"&lt;/A&gt;&lt;BR&gt;<BR>&lt;A HREF=# 
  onclick='Javascript:alert("newvar="+newvar);'&gt;view&nbsp; 
  "newvar"&lt;/A&gt;<BR>&lt;/body&gt;&lt;/html&gt;</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Thanks in advance</FONT></DIV>
  <DIV><FONT face=Arial size=2>Lau</FONT></DIV></BLOCKQUOTE></BODY></HTML>