Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JSP (http://www.go4expert.com/forums/jsp/)
-   -   Text field updation on selction of drop down list (http://www.go4expert.com/forums/text-field-updation-selction-drop-list-t16499/)

amar4java 11Mar2009 00:17

Text field updation on selction of drop down list
 
Hi everyone im new to this forum and this is myfirst post so excuse me for any mistakes

Im doing a final year project on banking i want help to move further

basically im designed a jsp webpage in which the form has a selecttio list or drop down list which is retrieved from a database table now i want to display a value from the same table in a text field in the form when i choose an option in the drop down list ,can anyone tell me how to do this in jsp.


thank u.

indiansword 11Mar2009 00:30

Re: Text field updation on selction of drop down list
 
friendly welcome, and lets wait for someone to answer it :)

shabbir 11Mar2009 09:53

Re: Text field updation on selction of drop down list
 
Something like this

Code:

<script language="javascript" type="text/javascript" >
<!--
function my()
{
        var var1;
        var1=document.getElementsById("Text1");
// Use Var1 to be put into something else.
}
-->
</script>     
<form id="form1" runat="server">
        <input id="Text1" type="text" name="name_txt" value="1234567890"/>
        <input id="Button1" type="button" value="button" onclick="my()"/>
</form>

Use Var1 to be put into something else.


All times are GMT +5.5. The time now is 08:35.