Put your <SELECT> outside the form. In its ONCHANGE event, use the Selected
value to change the form's ACTION to the appropriate servlet, then post the
form. I think this is what you're trying to do, although both OPTIONS point
to the same servlet.
----- Original Message -----
From: Keith Ball
To: [EMAIL PROTECTED]
Sent: Thursday, October 21, 1999 9:33 AM
Subject: Off-Topic : How can I POST to a servlet rather than just GET using
onChange=
How can I post data to a URL rather than just GET it by using javascript...
here is what I get but I want to post the MOCCA or the SAMOC to the page.
<form method="post" action="/servlets/UpdateList">
<select name="site_vers" onChange="var
D=this.options[this.selectedIndex].value; if (D) top.location.href=D;">
<option value="/servlet/UpdateList">SAMOC
<option value="/servlets/UpdateList">MOCCA
</select>
<INPUT TYPE=\"image\" src=\"/okbutton.gif\" alt=\"Go to this version list.\"
height=\"24\" width=\"31\" border=\"0\" align=\"middle\">
</form>
Thanks for any help.
Keith
---------------------------------------------------------------------------
Keith Ball - Praktikant
AF12 Operationelle Analysen Luftwaffe
IABG MbH Einsteinstr. 20 85521 Ottobrunn
Phone : 0049-89-6088-2556
Email : [EMAIL PROTECTED] WWW site : www.iabg.de
----------------------------------------------------------------------------
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html