Page 1 of 1 1
Topic Options
#87075 - 2002-07-30 12:27 AM Can not address pop up window with com
Anonymous
Unregistered


I have been successfully opening IE and grabbing page data using com scripting with Kix but now I have a issue that *hopefully* you guys can help with.

I have a new site that I connect to that immediately launches a new window. When I try to get the ".innertext", I receive a kix error and the script stops. I assume this is because the window object that I created is not framed but the one that is created has frames - therefore - I get that error when I make a call to a frame that does not exist.

Is there a way to address (via com) IE window objects that were created by other IE window objects? Here is the code:

code:
$FRAME = "main"
$ie=CreateObject("InternetExplorer.Application")
$ie.visible=1
$ie.navigate("http://www.webserver.com")

... this is were I send keys to logon and the other IE window is opened ...

$testpage = $ie.document.frames($FRAME).document.documentelement.innertext

Here is the error:

Script error: invalid method/function call: missing required parameter 2!
While SubStr($ie.document.frames($FRAME).document.documentelement.innertext,19,4) = "WAIT"

[ 30 July 2002, 18:29: Message edited by: Beach ]

Top
#87076 - 2002-08-03 05:41 AM Re: Can not address pop up window with com
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
as nobody has replyed I shall do that.

have you got around that?
if, how?

if not say that too. I'll impersonate myself as ie-com-scripting-guru and find something worthwhile for you.
_________________________
!

download KiXnet

Top
#87077 - 2002-08-03 07:09 PM Re: Can not address pop up window with com
Anonymous
Unregistered


Thanks for the reply, I was beginning to lose faith...

I was not able to get around the issue. The only thing I could do was alter the page that was creating another instance of IE. Luckily - the login page was html based so I just omitted the javascript that created the additional window.

Hopefully, the webmaster will not change the page to server side processing.

Thanks again,

Beach

Top
#87078 - 2002-08-03 07:19 PM Re: Can not address pop up window with com
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mm...
heh, again I'm pushing my own solution, but have you thought of using object that gives you the whole page including html data?
something like microsoft.xmlhttp?

server side processing can be a little tricky thing and in many cases that reduces the ability to play with client.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1172 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.053 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org