Ok, what this:
Code:
WebBrowser1.document.getElementsByName("Submit")(0).onclick = ""
does is obliterate the onclick function. Now, I am not super familiar with VB but, if it can set an onclick, it should be able to set a variable, something like (to disable):
Code:
WebBrowser1.document.getElementsByName("Submit")(0).c_var = 1
and, to enable:
Code:
WebBrowser1.document.getElementsByName("Submit")(0).c_var = 0
Then in your javascript function:
Code:
function next_clicked()
{
if (document.getElementsByName("Submit")[0].c_var)
return;
.......
.......
The onclick event will fire (when c_var=1) but, the function will exit without taking any action. When c_var hasn't been declared or is 0, the function will operate as usual.
Bookmarks