my question is how can I get the value of the current selected option
<select id="termid" class="selectfield">
<option>Επιλέξτε</option>
<option value="1">Number1</option>
<option value="2">Number2</option>
</select>
and use it as a PHP variable in $value without submiting or updating the page?
<?php echo get_post_meta($value, "Note1", true); ?>
I made use of this to load a file but I can not do it for the above.
$(document).ready(function() {
$('#termid').change(function() {
var val = $(this).val();
$('#reservationdetails').empty().addClass('loading').load('../' + val + '.php', function(){$('#reservationdetails').removeClass('loading') });
});
});
Thank you for any help
You should get the value of the selected option: