Wrox Programmer Forums
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 8th, 2009, 10:39 AM
Registered User
Join Date: Sep 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Events on new window


I used activex object to open the application in IE. That always opens ina new window. My requirement is that I need to attach event listener to that child window. I can make it close by calling quit method. But instead of window.attachEvent if I use Explorer.attachEvent then it throws error. Is there any way I can get control of the child window or a way i can open it in the same window and attach events?
Please help.

Part of my code is like below:

<Script LANGUAGE="JavaScript">
var Explorer;
function openIE()
Explorer = new ActiveXObject("InternetExplorer.Application");
Explorer.Visible = true;
function closeIE(Explorer)
function statusreport(){
if (window.attachEvent)
window.attachEvent("onload", statusreport)
window.attachEvent("onkeypress", showit)
function showit()
alert("event.x: "+event.x)
alert("event.y: "+event.y)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
Window refresh and window pop up in Java Script Aleksandra Javascript How-To 2 March 2nd, 2007 06:47 PM
closed parent window when opened child window jaiwin Javascript How-To 0 October 8th, 2006 12:54 PM
Events in an IE Window parasbdoshi VB How-To 1 May 10th, 2004 12:11 PM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.