"yankee" <> wrote in message
news: oups.com...
> When I click on the button, I have a javascript error. I just want to
> execute the command into the "VALUE" argument when I click on the
> button. How I can do that?
Give your <form> a default action:
<form action="noJS.html" method="GET">
Change the name and id of your <select> to something other than "type"
(a Select object has a "type" property which you are overriding by
naming it that). Also the name and the id should not be the same:
<select name="myType" id="myTypeId">
Then have a submit button as follows:
<input type="submit"
value="Next -->"
onclick="
var s = this.form.elements['myType'];
this.form.action = s.options[s.selectedIndex].value;
"
>
This way, if JavaScript is available, the -action- of the form will
change and the form will do a GET to the value of the currently selected
Optioin. If JavaScript is disabled or unavailable, the form will submit
to the default action you specified display a page telling the user the
form only works if they have JavaScript enabled.
--
Grant Wagner <>
comp.lang.javascript FAQ -
http://jibbering.com/faq