I am trying to reload the page using java script the page reloads but the post data in the page is not loading the post data are deleted while the page reloads can any one help me with it
function currencychange(xxx) {
setTimeout('delay()', 2000);
}
function delay(){
location.reload();
}
this is the javascript code which I am using to reload the page onchange
window.location.reload()issues aGET, so yes, thePOSTdata will be lost.The only ways you can issue a post are either:
Use AJAX to post the data back, get the new page, and replace your body element with it, or
Create a form element on the page with the action being the current
window.location.href, and place the data you want to post back inside it as hidden inputs. Then, on currency change callform.submit()