Hi, i have a webpage that in turn calls a window.open command on a new URL (generating a pop-up window) and refreshes itself.
Basically focus is being returned when the pop-up is another webpage, but when i try to open a pop-up linking to a PDF the focus is lost.
The pop-up loads up, switches to the background and the main page retains focus, thus hiding the PDF page behind it.
Here's my code:
function retainfocus(strRel, strLink)
{
var objWin;
objWin = window.open(strRel, strLink);
objWin.focus();
return objWin;
}
The button that the User presses has this as it's <a href>:
<a href="javascript:document.registercheck2.submit();retainfocus('../..' + '<%=strProductLink%>');">
I thought that switching the form submit and the retainfocus() functions would help but it doesnt...
Any help would be great,
Thanks
Arun
Basically focus is being returned when the pop-up is another webpage, but when i try to open a pop-up linking to a PDF the focus is lost.
The pop-up loads up, switches to the background and the main page retains focus, thus hiding the PDF page behind it.
Here's my code:
function retainfocus(strRel, strLink)
{
var objWin;
objWin = window.open(strRel, strLink);
objWin.focus();
return objWin;
}
The button that the User presses has this as it's <a href>:
<a href="javascript:document.registercheck2.submit();retainfocus('../..' + '<%=strProductLink%>');">
I thought that switching the form submit and the retainfocus() functions would help but it doesnt...
Any help would be great,
Thanks
Arun