I am a novice to ajax and want to know how to send data using jquery ajax method, any help will really be appreciated. This is my code:
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>
<script>
function show(str){
$(document).ready(function(){
$("#games").change(function(){
valcc = $("#games").val();
$("#div1").load("gg.php");
});
});
}
</script>
</head>
<body>
<select id="games" name="games" onchange="show(this.value)">
<option value="cricket">cricket</option>
<option value="soccer">soccer</option>
<option value="chess">chess</option>
</select>
<input type="button" name="button" value="button" id="button" />
<div id="dd">Please select a Game</div>
<div id="div1" style="width:300px; height:200px; border:1px solid #999;"></div>
I need to send the value of select option to the gg.php page and then procees it. Please help
$("#div1").load("gg.php?valcc="+valcc);? And then use$_GET['valcc']ingg.phppage