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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

closes.Click() 1

Status
Not open for further replies.

IonCurici

Programmer
Oct 29, 2002
24
MD
doesn't work :(
the child opens, but the parent wouldn't close unless i click the href.
here is what it is:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1251&quot;>
<script language=&quot;JavaScript&quot;>
<!--
function openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>
</head>

<body onLoad=&quot;openBrWindow('src/mfs.htm','','status=yes,resizable=yes');closes.Click()&quot;>

<object id=&quot;closes&quot; type=&quot;application/x-oleobject&quot; classid=&quot;clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11&quot;>
<param name=&quot;Command&quot; value=&quot;Close&quot;>
<embed command=&quot;Close&quot; src=&quot;Close&quot;>
</embed>
</object> <a href=&quot;javascript:closes.Click()&quot;>Close the window</a>
</body>
</html>
 
I've amended it, it seems the object hasn't been created when the closes.Click() statement runs.
Here's the amended version (tested)
Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1251&quot;>
<script language=&quot;JavaScript&quot;>
<!--
function openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
//-->

</script>
</head>

<body onLoad=&quot;openBrWindow('src/mfs.htm','','status=yes,resizable=yes');&quot;>
<object id=&quot;closes&quot; type=&quot;application/x-oleobject&quot; classid=&quot;clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11&quot;>
  <param name=&quot;Command&quot; value=&quot;Close&quot;>
  <embed command=&quot;Close&quot; src=&quot;Close&quot;>
  </embed> 
</object> <a href=&quot;javascript:closes.Click()&quot;>Close the window</a>
<script>closes.Click()</script> 
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top