I have the following line of code that is called using jQuery when a link is clicked:
alipayTransactionModalTrigger.click(function(e) {
e.preventDefault();
$.ajax({
url: "doSomething",
data: "p_locale=en-US",
success: function(dataOut){
if (dataOut == "hold") {
...do something...
} else {
//open a modal over parent window
alipayTransactionModal.dialog("open");
//also open new tab/window
var Payment = window.open("http://www.alipay.com", "Payment");
Payment;
Payment.focus();
}
}
});
return false;
});
The ajax call just checks some values basically. The success call is happening like it should, that is not the problem. Through the use of the frame name I am trying to force the newly opened window/tab to get refreshed when the link is clicked more than once. This works in IE 8, Chrome, and Firefox - a user can click the link any number of times, and it will only open a new window once - subsequent clicks just reload that window.
However, this is not happening with IE 9 - IE 9 will open a new window/tab each time. Any way to force this behavior in IE 9? Or even just an explanation of why this is occurring in IE 9 would be great - is it a user level setting? From what I can tell, IE9 just does not know what I am pointing it towards when I use the frame name in window.open()
.
Another thing I should mention - the .focus()
does not always focus the window on second/third/etc clicks (seems to depend on browser and browser settings) - but I have already asked that question here Just including it here in case it is relevant.
Thanks