here is my iQuery code :
Code:
<html>
<head>
<title>Selects jQuery parsed..</title>
<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
$("#no_exam").change(function(){
var textval = $(":selected",this).val();
$('input[name=std_marks]').val(textval);
result_form.std_marks.disabled=(!textval)?false:true; // if select a value , text feild is readonly
})
});</script>
</head>
<body>
Selection :<select name="no_exam" id="no_exam">
<option value="" selected="selected">===select option===</option>
<option value="A+">100-75</option>
<option value="B+">50-74</option>
<option value="C+">0-49</option>
<option value="AB">AB</option>
<option value="NE">NE</option>
<option value="MC">MC</option>
</select></br>
Selected value :<input type="text" name="std_marks" id="std_marks"/>
</body>
</html>
this code is works perfectly for me...But I want to change this code ..
my problem is here this selection group have two categories...one is marks & other is absent..
* Marks category:100-75,50-74,0-49
* Absent category :AB,NE,MC
Here when I select a option then it's value is parse to the Selected value box..How can I edit this code to parse values only select Absent category options....(When I select a Marks category option ,do not parse a its value )