I want add value in jquery function an post it to my php file. I call my jquery function whit onclick event but i don't know how can add value. I have this input tag:
<input type="hidden" name="code" id="code" value="<?php echo $code; ?>" />
and my onlick event this is:
<span onClick="previewed_files(); checkDb();">start</span>
and my checkDb function it is:
<script type="text/javascript" >
function checkDb(adscode){
$.post('myphp.php',{adscode: adscode},function(data){
$('#mydiv').html(data);}
);
}
</script>
now I can't call value from input by id code in my checkDb() function in onclick event. please help me. thank you