platypidesigns
03-04-2005, 03:27 PM
Hi,
I have a javascript function as well as a javascript embedded directly into HTML. What I have been trying to do is merge one component - winref.focus(); - of the embedded javascript into the function so that I can use it over and over again.
This winref.focus(); component brings the focus back to the pop up window when a user clicks on a button that triggers the pop up window function.
__________________________________________
here is the function
function openTipsExamples() {
popupWin = window.open('../EORightElements/Chapter_3_01_TipsExamples.htm',
'open_window', 'scrollbars,resizable,dependent,width=590,height=400,left=0,top=0')
}
___________________________________________
Here is the embedded javascript in HTML
<a href="#" onclick="javascript:winref=window.open('adoptframe.htm','adoptframe','left=20,top=20,width=775,height=575,men ubar=1,status=0,location=0,scrollbars=1,toolbar=1,resizable=1');winref.focus();">Adoptions Listings</a>
_______________________________________________
So far I haven't been successful. The embedded javascript in HTML works just fine but I know there is some way to incorporate this into the function.
If you have any ideas, please advise.
Thanks,
Tanya
I have a javascript function as well as a javascript embedded directly into HTML. What I have been trying to do is merge one component - winref.focus(); - of the embedded javascript into the function so that I can use it over and over again.
This winref.focus(); component brings the focus back to the pop up window when a user clicks on a button that triggers the pop up window function.
__________________________________________
here is the function
function openTipsExamples() {
popupWin = window.open('../EORightElements/Chapter_3_01_TipsExamples.htm',
'open_window', 'scrollbars,resizable,dependent,width=590,height=400,left=0,top=0')
}
___________________________________________
Here is the embedded javascript in HTML
<a href="#" onclick="javascript:winref=window.open('adoptframe.htm','adoptframe','left=20,top=20,width=775,height=575,men ubar=1,status=0,location=0,scrollbars=1,toolbar=1,resizable=1');winref.focus();">Adoptions Listings</a>
_______________________________________________
So far I haven't been successful. The embedded javascript in HTML works just fine but I know there is some way to incorporate this into the function.
If you have any ideas, please advise.
Thanks,
Tanya