Rats! Still no go. $ie->Document->parentWindow is undefined. BTW, I'm using IE6. Here's the code. Any help would be greatly appreciated!
Michael % ) HTML Document <html> <head> <script language="JavaScript"> function Hello() { alert('Hello World!'); } </script> </head> <body> <a href="JavaScript:Hello()">Hello World!</a> </body> </html> Perl Application #!C:\Perl\bin\perl use Win32::OLE; use Data::Dumper; $ie = Win32::OLE->new("InternetExplorer.Application", \&quit) || die "FATAL ERROR - Failed to create instance of Internet Explorer!"; $ie->{left} = 0; $ie->{top} = 0; $ie->{width} = 300; $ie->{height} = 300; $ie->Navigate("http://localhost/index.php"); while ( $ie->{busy} ) { $ie->{visible} = 0; } $ie->{visible} = 1; $dmp = Data::Dumper->new([$ie->Document->parentWindow]); if (open(DMP,"+>admin.dmp")) { print DMP $dmp->Dump; close(DMP); } # if sub quit { my ($object) = @_; $object->Close(); } # sub ----- Original Message ----- From: "Steve Combs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 7:19 PM Subject: RE: Perl-Win32-Web digest, Vol 1 #679 - 9 msgs > I was intrigued and took note of this when it was asked and > answered a couple of months ago. Try this set of archives: > http://aspn.activestate.com/ASPN/search?query=calling+javascript+from+within > +perl&type=Archive_perl-win32-web > > --Steve > > > > Reply-To: "Enye Software" <[EMAIL PROTECTED]> > > From: "Enye Software" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Subject: Executing JavaScript via OLE > > Date: Thu, 11 Apr 2002 09:36:06 -0000 > > Organization: Enye Software > > > > Hi, > > > > I am trying to call a JavaScript function from a Perl Win32::GUI > > application that automates Internet Explorer using Win32::OLE by > > creating an instance of the InternetExplorer object. Basically, I am > > trying to execute or call a JavaScript script function so that I can > > remotely control the web page. > > .... > > > > Thank you in advance. > > > > Michael > > _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs