Forum Moderators: open

Message Too Old, No Replies

Query regarding pop-up window focus

         

sreedevi2006

6:14 am on May 30, 2006 (gmt 0)

10+ Year Member



The function dispPopUp() is used to launch a pop-up window, if the pop-up window is minimised it refocuses on it to display it. I would like to know why return false; is used. Can anyone please explain?

function dispPopUp()
{
features="height=400,width=500,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,top=200,left=200";

winId = window.open( uri,profileNames[0],features);
winId.focus();

return false;
}

RonPK

10:47 am on May 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the function is called like in

<a href="somepage.html" onclick="return dispPopUp();">text here</a>

,

return false;
will stop the browser from opening somepage.html.