Default to true - This page cannot be refreshed without sending the information

Hello Experts,

I currently have an asp.net web application for internal use in our company.  It allows the user to open a popup window, update some data, then close the popup window.  Closing the popup window then refreshes the parent window with the new data.

This is all working.  Except they get the message "This page cannot be refreshed without sending the information.  Retry - Cancel".  That's fine, it's the intent for it to update the parent window with the modified information.  The problem is, the users don't want to have to click the retry button every times this happens.  They want it to default to true and just update the page.  How can I do this?

Here's the javascript I'm using to reload the parent window and close the popup.  I guess I'm looking for something like "Reload(True)" to default it to true without user intervention.  Retargetting to the parent url will not work as there are a ton of user selected fields that need to be remembered on post back.

Thanks!
Maurice
btnClose.Attributes.Add("onClick", "window.opener.location.reload();window.close();")

Open in new window

LVL 2
GRCHELPDESKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Melih SARICAOwnerCommented:
when u use reload explorer acts as u hit F5 and try to send the data again  last time u do (clicking a link or button (.net control) ) ..

so u ll get that message.. try to relocate the url ..

btnClose.Attributes.Add("onClick", "window.opener.location.replace(location.href);window.close();")
0
GRCHELPDESKAuthor Commented:
Hi Non Zero,
Thanks for the feedback.  I tried your suggestion, but no joy.  The pop-up window seems to refresh but that's it.  For some reason, the popup doesn't even close.  Not sure why ... javascript is not my forte.
Thanks!

btnClose.Attributes.Add("onClick", "window.opener.location.replace(location.href);window.close();")

Open in new window

0
Melih SARICAOwnerCommented:
try this...


  	
 
btnClose.Attributes.Add("onClick", "window.opener.location.replace(window.opener.location.href);window.close();")

Open in new window

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

GRCHELPDESKAuthor Commented:
That worked.  Except, it basically re-initializes the page.  So all of the users pre-selected values are lost.  I considered a querystring approach, but there are many pre-selected values.  And it would require a significant redesign at this point.
I basically need it to do the postback so it remembers the previous values, I just need to supress the refresh message and just do it.
I tried this code as it looked promising, but it doesn't seem to actually do the postback.  Any ideas are much appreciated!

btnClose.Attributes.Add("onClick", "window.opener.document.forms[0].submit();window.close();")

Open in new window

0
Melih SARICAOwnerCommented:
ok..

open ur Popup with

window.showModalDialog(url,arguments,features)

then u close this modaldialog u dont ave to refresh cuz it do refresh itself

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GRCHELPDESKAuthor Commented:
Looks great, thanks!  
I'll see if I can get the syntax right and let you know how it works out for me!  :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.