Client Side Coding > Javascript & Ajax

Select a value and get next value

(1/1)

mohsin1122:
hi
i want that when i select some value from dropdown it shows the value associated with that dropdown value in next field plz help me

Vasu Jv:
hi,

   you want this if not describe what you want in with some html


<html>
<head>
    <title></title>
   <script src="jquery-1.6.2.min.js"></script>
      <script language="javascript">
   $(document).ready(function(){
      $("select").change(function(){
    alert( $('#op option:selected').next().val());
   });
   </script>
</head>
<body>
   
    <div id="example" class="k-content">
        <select id="op">
         <option value="0">0</option>
         <option value="1">1</option>
         <option value="2">2</option>
         <option value="3">3</option>
         <option value="4">4</option>                                    
      </select>
    </div>
</body>
</html>

Navigation

[0] Message Index

Go to full version