Hello i am using javascript to pass variable to another php file but its working with KeyUp function ... i want to use variable value instead of keyup ..(like value from $_GET[] or some other variable) here is my code
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" >
$(document).ready(function(){
$('#op_comp_id').load('bh.php').show();
$('#get_value_id').keyup(function() {
$.post('bh.php', { id: form.get_value.value },
function(result){
$('#op_comp_id').html(result).show();
});
});
});
</script>
</head>
<body>
<?$id = $_GET['id'];?>
<form name="form">
<input type="text" id="get_value_id" name="get_value" value="<?php echo $id ?>"></input>
</form>
<div id="op_comp_id"></div>
</body>
</html>
* Edited *
This will pass variable Value to my bh.php in post mode (bh.php?id=value) .... so any alternative to keyup in this case ??? so i dont have to put keyup... value should go through variable ...