ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2462.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>David,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Read up on the eval() 
function.&nbsp; It&nbsp;can take&nbsp;a string and turn it into the appropriate 
object reference, e.g.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>var myPointer = 
eval("document.all.myDiv.style.color");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Should be what you're looking 
for.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Peter</FONT></DIV>
<BLOCKQUOTE dir=ltr 
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=dlevy@lancer-ins.com href="mailto:dlevy@lancer-ins.com">David 
  Levy</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> Wednesday, August 01, 2001 10:02 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] strings into 
  variables</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=2>Hi, I'm trying to turn a string into a variable name.&nbsp; 
  In other words, suppose I get input from a user, and want to convert that 
  string into a name of a variable and use it in a function.&nbsp; The reason I 
  have for doing this is that the input I get from the user will be an actual 
  preexisting variable name in the script, but there are very many of these 
  variables and I'd like to refer to them without using switches.&nbsp; I hope 
  this was clear and please tell me if you need clarification.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=2>David Levy.</FONT></DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>