Look ar this too... :
<select size="1" name=D1 id="myselect">
��� <option value="val1">val1</option>
��� <option value="val2">val2</option>
��� <option value="val3" selected>val3</option>
��� <option value="val4">val4</option>
</select>
By adding the selected constant in the option tag
you can define wich of the options that is selected as
default...
Einar A. Forselv
At 10:30 19.08.00 +0100, you wrote:
>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"
> 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
�������������������������o 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
- change the "selected" option of select option Leena Diwan
- Re: change the "selected" option of select o... Manish Kabra
- Re: change the "selected" option of select o... Kanojia Jogesh
- Re: change the "selected" option of select o... Arnab
- Re: change the "selected" option of select o... Einar Forselv
- Re: change the "selected" option of select o... Leena Diwan
