jacen6678
10-08-2004, 11:20 AM
Please see my newer post.
|
Click to See Complete Forum and Search --> : Trying to add Options to a select jacen6678 10-08-2004, 11:20 AM Please see my newer post. agent_x91 10-08-2004, 02:54 PM this thread is a complete waste of space... don't spam. jacen6678 10-08-2004, 03:11 PM I'm not spamming... I: 1) made this post 2) decided that i wanted to change the title 3) found that title changes dont seem to work 4) made a new post 5) tried to delete this post 6) found out that that feature is also not working So, I am terribly sorry if I made an unnecessary post. I am glad that your response was oh so amazingly informative. "Don't spam"... gee thanks... I really did not know that. I hope you are now aware that I tried and was not allowed to clean up my extra postings. Thank you for your time and insightful contributions. Warren86 10-09-2004, 06:45 AM <HTML> <Head> <Script Language=JavaScript> function insertOption(isList,isValue,isText){ isData = new Option(isText,isValue); isList.add(isData,isList.options.length); } function removeOption(isList,removeItem){ isList.selectedIndex = removeItem; isList.remove(isList.selectedIndex); isList.selectedIndex = 0; } function getSelection(isList){ isValue = isList.options[isList.selectedIndex].value; alert(isValue) } </Script> </Head> <Body> <br><br> <center> <select name='List1' onChange="getSelection(this)"> <option value='null' selected> Make a selection </option> <option value='1st'> First </option> <option value='2nd'> Second </option> </select> <input type=button value='Insert New Option' onClick="insertOption(List1,'3rd','Third')"> <input type=button value='Remove Last Option' onClick="removeOption(List1,3)"> </center> </Body> </HTML> agent_x91 10-09-2004, 06:49 AM Thank you for your time and insightful contributions. np, that's what I'm here for. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |