PDA

View Full Version : IE 7 Pop up bloker should not refresh page once accepted



vish.tomar
05-01-2010, 04:47 AM
Hi,
I have a window1 which have print button on click it opens a new pop up window, for IE 7 (Other IE may be) if i have enable the pop up blocker, blocker asked to add the site for blocker if i add or temporarily allowed the pop up from site, it refresh the window1.

How do i prevent to refresh the window1, if i allow the pop ups?
because the refresh cause to increase the print no.

It works fine with Mozilla.

-Vish Tomar

jscheuer1
05-01-2010, 05:40 AM
What's a print no? I'm assuming you mean the number of print jobs.

Perhaps a solution would be to put the directive to print on the pop up page:


opener.print();

This assumes that you are printing the page that opens the pop up, not the pop up page.

Another approach would be to keep the print job and the pop up completely separate.

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

vish.tomar
05-01-2010, 06:12 AM
Thanks for quick response, issue is not related to print. it general issue when from page1, i opens a pop up page2, IE pop up blocker asked to allow to pop up. if i allow it Refresh the page1 first, which executes server site, get dynamic data. for example print job number.

In our case it BOM (bill of material number). when user add a item to cart, we dont have checkout this time, so user can create BOM and print or email that to us (manufacturer), its like a quotation for materials.
BOM page is dynamic, because of IE Refresh the page1, new bom created into database, but with mozilla it wont refresh the page1 when allow pop up.

Motto: to restrict page fresh in IE 7 (when we accept the pop up)
Thanks,
VT

jscheuer1
05-01-2010, 02:56 PM
Even if you could control that behavior in javascript, which I seriously doubt, what happens if the user simply decides to refresh the page on his or her own? Unless I am mistaken, you will have a problem then, even in Firefox.

Two things I can think of to do:


Don't open a pop up. Use a hidden division. Then reveal it instead of creating a pop up - there will be no pop up blocker for that. You may even use AJAX with that if it needs to get/send updated information to or from the server. It can be positioned absolutely so as to appear to 'pop up' over the page. This just makes good sense anyway, though it doesn't really solve the refresh problem. Who wants to see the "allow pop up" dialogue? Or just deal with it another way, but don't pop up. Many advanced commerce sites manage very well without pop ups.


Deal with the refresh issue on the server side - that's the only place it can be addressed. Set up some mechanism that weeds out duplicate submissions.

vish.tomar
05-02-2010, 05:36 AM
Thanks John,

100% satisfied !!

it is what i am looking for "Even if you could control that behavior in javascript, which I seriously doubt, what happens if the user simply decides to refresh the page on his or her own? Unless I am mistaken, you will have a problem then, even in Firefox."

1. I am considering i could not restrict the page refresh in IE7 when we allow popup through JavaScript.
2. We have to manage the things in server side, which handles page refresh.

After this suggestion you are the part of our team.

Thanks,
VT