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

Clicking JavaScript from VB6 WebBrowser

Clicking JavaScript from VB6 WebBrowser

------------------------

The web site Java Script contains code typically as:

Code:
<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.

Code:
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:

Code:
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:

Code:
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)
[2144 byte] By [dmb-job] at [2007-11-11 10:28:42]
# 1 Re: Clicking JavaScript from VB6 WebBrowser
I can successfully 'click' using the following very simple 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 17:22:34 >