<HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>That was a correct answer, but it doesn't work with strigs,</DIV> <DIV>because strings are interpreted literaly, there are other ways to work that out.</DIV> <DIV>Why don't you try another aproach?</DIV> <DIV>Make you're VAR global by declaring it as </DIV> <DIV>var myname="" </DIV> <DIV>outside of any function,</DIV> <DIV> </DIV> <DIV>Write a function that change's the value of variable - mymame,</DIV> <DIV>and read you're value, for instance some input and say:</DIV> <DIV>{myname=the_ID_of_the_input.value}</DIV> <DIV>and refer to it, with:</DIV> <DIV>eval(myname)</DIV> <DIV>this way the myname variable will allways have an updated name, the most recently entered in the field.</DIV> <DIV>Regards!</DIV> <DIV><BR> </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> Andrew Gibson</DIV> <DIV style="FONT: 10pt Arial"><B>Sent:</B> Sunday, April 08, 2001 7:44 AM</DIV> <DIV style="FONT: 10pt Arial"><B>To:</B> javascript@LaTech.edu</DIV> <DIV style="FONT: 10pt Arial"><B>Subject:</B> RE: [Javascript] apostropes... '</DIV> <DIV><BR></DIV>Thanks Jeff, I tried this though and it didn't<BR>work.....<BR><BR>eval ("var myname='O\'Relly'");<BR>alert (myname);<BR><BR>> > How do I deal with ' in a person name<BR>> ><BR>> > eval ("var myname='ORelly'")<BR>> > is ok<BR>> > but what about<BR>> ><BR>> > eval ("var myname='O'Relly'")<BR>><BR>> eval ("var myname='O\'Relly'")<BR>><BR>> Jeff<BR>><BR>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>> Jeff Walters (314) 962-4024<BR>><BR>> Cybermill Communications<BR>> 8616 Joseph Ave<BR>> St. Louis, MO 63144<BR>> Jeff@cybermill.com<BR>> http://www.cybermill.com/<BR>><BR>><BR>> _______________________________________________<BR>> Javascript mailing list<BR>> Javascript@LaTech.edu<BR>> http://www.LaTech.edu/mailman/listinfo/javascript<BR>><BR><BR>_______________________________________________<BR>Javascript mailing list<BR>Javascript@LaTech.edu<BR>http://www.LaTech.edu/mailman/listinfo/javascript<BR> <DIV></DIV></BLOCKQUOTE></BODY></HTML><DIV><BR><br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p></DIV>