JqueryMobile: How replace the url in windows.history
How can we replace the URLs in windows history in jquery mobile application when first time saving the data
(for example I can change the url "/customer/addeditcustomer" to "/customer/addeditcustomer?custid=104" )
I have tried the below script but, failed
if (typeof window.history.pushState == 'function') {
history.replaceState({}, 'AddEditCustomer', '/customer/addeditcustomer?custid=104');
}
but i get the error "Uncaught TypeError: Cannot call method 'replace' of undefined"
Please help me