I am using the following JavaScript to get the HTML.
$('#myHref').change(function() {
var value = $('#myHref').val();
$.get('get_project.php',{id:value},function(data) {
$('#projectDetail').html(data);
$('#projectDetail').fadeIn('slow');
});
});
I use some html in get_project.php
as follow:
<select name="sn_id" id="sn_id" >
<option>Data1</option>
<option>Data2</option>
.....
</select>
I want to select menu and get returned on the basis of it. So again I add the following JavaScript to get value according to selected sn_id
:
$('#sn_id').change(function() {
var value = $('#sn_id').val();
$.get('calculate_invest.php',{id:value},function(data) {
$('#show_me').html(data);
});
});