Question : when pop up is opened, redirect parent to index page

Hello experts,

I have this problem that when I open a pop window , parent window is redirected to the index page. i don't want parent window to be refreshed or redirected.

This is my pop up code :

function open_faculty_win(w){
      stats='resizable=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,'
      stats += 'scrollbars=yes,width=600,height=600';
      hWindow = window.open (w,"Window",stats)
      setTimeout ("hWindow.focus ()", 500);
}

Answer : when pop up is opened, redirect parent to index page

Why would that  make a difference?

It is likely a missing return false

Here is the canonical method

<a href="facultypage.html" target="_blank" onClick="return open_faculty_win(this.href,this.target)">Pop</a>


function open_faculty_win(loc,target){
     stats='width=600,height=600,resizable,toolbar=no,location=no,directories=no,status,menubar=no,scrollbars';
     var w = window.open (loc,target,stats)
     return w?false:true
}


If you must focus, add the focus to the page you open instead
Random Solutions  
 
programming4us programming4us