Hi ,
i got a very simple problem (at least i gues it is)...
I have a html combobox in a form, and i would like to handle the selected option with a javascript function.
My problem seems to be : how can i get the selected option with javascript ...
not sure ...
Here is my error message (got with firebug) :
document.frmname have no properties
My code :
Code:<script type="text/javascript"> <!-- function getit(comboboxname){ SelectedDownload=document.frmname.getElementById(comboboxname).value; alert(SelectedDownload); /* debug */ } --> </script> <form name="MyDownloads"> <select name="MyDownloadItems" id="MyDownloadItems" size="1" style="background-color:#5aff52;"> <option value="download1.zip">Download 1</option> <option value="download2.zip">Download 2</option> <option value="download3.zip">Download 3</option> </select> <input type="button" name="Download" value="Download" onclick="getit('MyDownloadItems');"> </form>



Reply With Quote

Bookmarks