I am using the GET method inside the form and I want to change the URL after every button click.
This is my HTML form:
<form id="user_form" method="GET">
<input placeholder="Search A Word" type="text" class="txtSearch" name="ajaxData" id="ajaxData">
<input type="submit" name="btnSubmit" id="btnSubmit" Value="Submit">
</form>
and this is my Ajax call:
$("#btnSubmit").click(function(){
var textboxvalue = $("#ajaxData").val();
$.ajax({
data: {ajaxData:textboxvalue
},
type: "GET",
url: 'dictionary.php',
success: function (result)
{
$(".php_responce_here").html(result);
}
});
return false;
});
I want to change the query string after every button click.
For example, if I write yes in the textbox, this is the query string:
http://localhost/hifzil/game.php?ajaxData=yes&btnSubmit=Submit
Though it's working, the query string is not changing while writing again and again in the textbox. How do I change the query string after every submission in the textbox?