hello !
Sorry this is a bit off the topic.
I want to modify the selected value of the select
statement programatically. please help ..
here is what I tried to do :
<form method="POST" name=myform action="test.jsp">
<p><select size="1" name=D1 id="myselect">
<option value="val1">val1</option>
<option value="val2">val2</option>
<option value="val3">val3</option>
<option value="val4">val4</option>
</select></p>
<p> </p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"
onclick="change()"><input type="reset" value="Reset"
name="B2"></p>
<script>
function change(){
document.myform.D1.value="val3";
}
</script>
</form>
but this changes the value momentarily and then again
comes back to the first option value.
Thanks
diwan
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets