Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is name parameter in window.open()

Tags:

javascript

please can some one tell me what is this window name in window.open() is it title name or some Id in java script language?

like image 368
jazz Avatar asked Feb 28 '23 09:02

jazz


1 Answers

windowName

A name to be given to the new window. The name can be used to refer this window again.

After opening the window you will want to do all sorts of things with it e.g. move it it then you can do

<html>
<head>
<title>Window Example</title>
</head>
<SCRIPT language="JavaScript1.2">
function poponload()
{
    testwindow= window.open ("", "mywindow");
    alert('I will move window to 0,0');
    testwindow.moveTo(0,0);
}
</SCRIPT>
<body onload="javascript: poponload()">
<H1>Window Example</H1>
</body>
</html> 

And NO its not window title its different.

-source

like image 87
Pratik Deoghare Avatar answered Mar 08 '23 10:03

Pratik Deoghare