homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Assigning dropdown values via config area.
**total Blonde Moment All Help Appreciated**

10+ Year Member

Msg#: 713 posted 2:36 pm on Jul 25, 2003 (gmt 0)


I am having a **BLONDE** moment I need to have a simple config area in thecode that will define what the values of the dropdown options are.

Here is the code:

THE PROBLEM IS THAT THE END VALUE READS $MyValue1 instead of the actual string. Any help would really be appreaciated.

//set variable
$MyValue1="TEST Value"
$MyValue2="TEST Value"

document.write("<form name='test'>");
document.write("<select size=1 name=options onchange=test.text1.value=test.options.value>");
document.write(" <option>Choose one...</option>");
document.write("<option value=$MyValue1>option1</option>");
document.write("<option value=$MyValue2>option2</option>");
document.write("<input type=text name=text1>");

Kind Regards




WebmasterWorld Senior Member 10+ Year Member

Msg#: 713 posted 8:25 am on Jul 26, 2003 (gmt 0)

following to the logic of your script which scripting language i don't know, i'm assuming it's:

document.write("<option value="+$MyValue1+">option1</option>");

(is it vbscript?)


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved