Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

self.close starts function all over

Status
Not open for further replies.

estesflyer

Programmer
Dec 19, 2000
284
US
here is my script, when I click on the link that closes the window (the new window) the prompts keep coming up.

<html>
<title></title>
<script language=&quot;javascript&quot;>
<!--
function openwin()
{
var name=window.prompt(&quot;What is your first name?&quot;,&quot;Fred&quot;);
var color=window.prompt(&quot;What background color do you want?&quot;,&quot;orange&quot;);
var newin=window.open(&quot;&quot;,&quot;newindow&quot;,&quot;width=300,height=500,status=yes&quot;);
newin.document.write(&quot;<html>&quot;);
newin.document.write(&quot;<head>&quot;);
newin.document.write(&quot;<title>Hey &quot; + name + &quot;, thanks for dropping in!</title>&quot;);
newin.document.write(&quot;</head>&quot;);
newin.document.write(&quot;<body bgcolor=&quot; + color + &quot;>&quot;);
newin.document.write(&quot;<h1>here is your customized window, &quot; + name + &quot;</h1>&quot;);
newin.document.write('<a href=&quot;#&quot; onClick=&quot;self.close&quot;;>Click here to close this window</a>');
}
//-->
</script>
</head>
<body onLoad=&quot;openwin()&quot;>
hello world!
<script language=&quot;javascript&quot;>
<!--
//-->
</script>
</body>
</html>
 
not sure if this is your problem, but try:

self.close() jared@aauser.com
 
seems good to me


theEclipse
eclipse_web@hotmail.com
robacarp.webjump.com
**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top