Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Clicking JavaScript from VB6 WebBrowser

The web site Java Script contains code typically as:

<td class="subMenuOff" id="portfolioWatchLists" onmouseover="parent.changeSubMenuBgColor(this); " onmouseout="parent.changeSubMenuBgColor(this);"
onclick="linkTarget('/cgi-bin/apps/u/WatchListDisplay');" ><a href="https://wwws.izone.com/">Watch Lists</a></td>

From VB6, I want to 'click' the above.

Dim HTML As HTMLDocument
Set HTML = IzoneBrowser.Document 'is recognized as an Object
Dim WatchList As HTMLFormElement

WatchList = HTML.getElementById("portfolioWatchLists") "is ercognized as 'Nothing'

HTML.All.Item(WatchList).Click

Question: How do I click this item?
Or
If I 'clone' this, what do I replace the 'onclick", or can I place a 'submit' to replace the 'onclick'?
Could yu provide a reference on cloning in VB6?

I have sent the following:
https://wwws.izone.com/cgi-bin/apps/u/WatchListDisplay
which results in:
Internet Explorer Script Error
Line: 7
Char: 3
Error: Object doesn't support this property or method
Code: 0
URL: https://wwws.izone.com/cgi-bin/apps/u/WatchListDisplay[/url

Do you want to continue running scripts on this page?

Yes No

Clicking this, loads the correct display as an overlay frame, but results in another error message:

Windows Internet Explorer
Stack overflow at line: 15

Clicking this removes the code and the overlay frame is normal.
However, the frame that was overlayed is now non-responsive and remains so unless I either 'goback' or log off and log back on.

Any message sent thereafter produces the Stack Overflow.

What am I doing wrong with the direct HTTP message?

"Good software like good cooking takes time to prepare."
Winnie-the-Pough (sic)
[2019 byte] By [dmb-job] at [2007-11-11 10:28:39]
# 1 Re: Clicking JavaScript from VB6 WebBrowser
I can successfully 'click' using the following very simple code:

Code:

IzoneBrowser.Document.getElementById("portfolioWatchLists").Click

However, I still get the two errors in the original posting.
Winnie-the-Pough
dmb-job at 2007-11-11 23:34:26 >
# 2 Re: Clicking JavaScript from VB6 WebBrowser
Well it did work once and now it no longer works, I thought originally.

Or maybe I left some code in to set the cursor on the image of the button and sent an CR by that means.
This would work, except that the image would move is a pop-up occurred.
Winnie-the-Pough
dmb-job at 2007-11-11 23:35:26 >