Click here to Skip to main content
15,878,048 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi every one, I have problem need help that, I have a form have 1 select filed and 1 text field, I want when I choose value in option of select the text field will load/appear value in proportion to value of select, example in picture when I choose "B" in select field, the value in text filed will appear "1", so how to do it, I need example to refer, guide or demo example, Thank for read my topic.
Here is Image:
http://i1095.photobucket.com/albums/i472/OLAKEN91/gdf_zpsac464e04.jpg[^]
HTML
<head>
<title>Untitled Document</title>
<style type="text/css">
</style>
</head>
<body>
	<center>
    <br />
    <form id="cv" action="" method="">
    	Choose Option: <select id="chedo">
        <option>--Choose Value--</option>
        <option>A</option>
        <option>B</option>
        <option>C</option>
        </select>
        <br />
        <br />
        Value: <input type="text" id="lenh" size="40"/>
        <br />
        <br />
        <input type="submit" value="SUBMIT"/>
    </form>
    </center>
</body>
</html>
Posted
Updated 19-Dec-13 3:31am
v3

1 solution

thank for read and help of everyone, here is code
XML
<script type="text/javascript" language="javascript">
$("#chedo").change(function(){
    var selected = $("#chedo").val();
    $("#lenh").val(selected);
});
</script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900