javascript - To display the webpage again, Internet Explorer needs to resend -


in asp.net webforms page have modal window pops up. javascript code displaying modal window follows:

function openmailaddresswin(subscribercontactrelationgid, routeid, btn) {     window.showmodaldialog("subscribersecondaryaddress.aspx" + buildquerystringvaluesforsubscriber(subscribercontactrelationgid, routeid, returntxtreceiptdate().value), this, strwindowfeatures + ";scroll:no;dialogwidth:442px;dialogheight:350px");     location.reload(true); } 

after modal window closed need refresh parent page (hence location.reload(true); statement @ end) in order alterations made in modal window take affect.

now thing (not every time, infuriatingly) when close modal window warning popup says:

" display webpage again, internet explorer needs resend information you've submitted.

if making purchase, should click cancel avoid duplicate transaction. otherwise, click retry display webpage again."

any ideas why happening?

this double-submit problem in browsers.

when page loaded using post request , try reload page using location.reload(true);, browser needs send post request server , may cause problems post supposed change state on server. therefore, browser needs confirmation user. solve problem, use post-redirect-get pattern.

in case, using location.href = location.href should solve problem reload page using get.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -