javascript - change Jquery loaded page URL -


i have code on index.php page:

$('.editcustomer').load("page1.php");  <select name="date" id="date" class="form-control"> ...options here... </select> 

i have on page1.php should change page1.php page1.php?date=1234

$(document).ready(function() {         $('#date').on('change', function() {             $('.editcustomer').load("page1.php?date=" + $(this).val());             alert($(this).val());         });     }); 

but not doing because cannot find .editcustomer div

how can make change page1.php?

you can change url using history object:

manipulating history/url of page

history.replacestate(null, null, "page1.php?date=" + $(this).val()); 

though i'm not sure looking for.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -