• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

reloading page without retry button popup

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to reloading a page from a popup and closing the popup.
When i use :
opener.location.reload();
setTimeout("self.close()",100);

a popup window appears with retry or cancel buttons.

When i try:
opener.focus();
setTimeout("self.close()",100);

it goes to the opener page but does not reload.

Any suggestions

Thanks
Anil
 
Author
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the thread https://coderanch.com/t/117513/HTML-JavaScript/Basic I posted a bit of source code that uses Ajax to decouple the request process from the browser.

So instead of posting or the likes do a get as Asynchronous has a get method, and wait until you get a successful message. In the oncomplete method you cannot use location.href as the content will be sent to you, and you will need to replace the HTML body.

OK?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To answer the question:

a popup window appears with retry or cancel buttons.



That message normally happens when there has been form data submitted. It is to protect the user from submitting the data twice. What you need to do is use:

window.opener.location.href = window.opener.location.href;

or

window.opener.location.replace(window.opener.location.href);

This avoids the refresh message, but there is a chance you loose form data.

Eric
 
I like tacos! And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic