Hello,
Just so you can see what I'm working on here's the URL:
http://dev1.usachurch.com/
(username: staff / password: staffpw)
If you look half way down, you'll see the tan text ads. When clicked, javascript is being used to open up a new window (named "adwindow"). here's the JS code:
Code:
function adWin(adid,url,title){
adWindow = window.open('adWindow.jsp'+'?adid='+adid+'&ad_url='+url+'&title='+title,'adwindow');
adWindow.focus();
return false;}
the adWindow.jsp page handles the click counts in the stats DB, and the opens up 2 frames - the top small frame with the USAChurch image (named "header"), the bottom main frame (named "main"). the top header's src is adHeader.jsp, and this is where the problem is. I'm trying to simply focus back on the main window with a "opener.focus()" inside of a function, but its just not working (when clicking on the USAChurch image). Am I missing something obvious? I'm guessing the frames are breaking it. Here's the code in adHeader.jsp:
Code:
<script language=JavaScript1.2>
function goback(){
opener.focus();
return false;}
</script>
<a href="http://www.usachurch.com/" target="_blank" onClick="javascript:goback();return false;">
<img src=/i/adlink.gif width=114 height=30 border=0></a>
Thanks,
meeble
UPDATE: I moved the goback() JS code from the adHeader.jsp (top frame) page to the adWindow.jsp (frameset) page and it now works on Safari on Mac, but still not on IE or Netscape on Windows...