C
celoftis
Using VS2003, VB.NET, HTML and javascript,
BACKGROUND
I have a windows app that has an ActiveX (AxInterop.SHDocVw) browser
control.
During the execution of my app, a display a HTML page that has a radio
group on it... as radio buttons are selected, I am (mostly) able to
catch the event (onclick) in my VB.NET app. As radio buttons are
clicked, javascript fires a hidden button's onclick event that is
"listened" to in the winapp:
document.getElementById("btnSubmit").fireEvent("onclick");
In my "browser_DocumentComplete" sub I set my listener up like this...
Dim objBtnSubmit As HTMLInputElement =
browser.Document.GetElementById("btnSubmit")
If objBtnSubmit Is Nothing Then
Else
AddHandler objBtnSubmit.onclick, AddressOf
myBtnSubmit
End If
Then in sub myBtnSubmit, I run some code to do whatever...
PROBLEM
At some point the windows app stops handling the HTML events that are
being fired (myBtnSubmit does not get executed). After the win app
stops responding to HTML events, the javascript in the HTML page
continues to run correctly -- so I'm now weary of MSHTML's ability to
handle the events that are being raised. The handler seems to quit
working if I fire the onclick event quickly and repeatedly.
Is this a known issue with MSHTML handling HTML events? Is there
something that could be breaking this call back?
Any thoughts on the cause of this problem and/or viable solutions
would be appreciated.
Thanks for your attention to this... celoftis
BACKGROUND
I have a windows app that has an ActiveX (AxInterop.SHDocVw) browser
control.
During the execution of my app, a display a HTML page that has a radio
group on it... as radio buttons are selected, I am (mostly) able to
catch the event (onclick) in my VB.NET app. As radio buttons are
clicked, javascript fires a hidden button's onclick event that is
"listened" to in the winapp:
document.getElementById("btnSubmit").fireEvent("onclick");
In my "browser_DocumentComplete" sub I set my listener up like this...
Dim objBtnSubmit As HTMLInputElement =
browser.Document.GetElementById("btnSubmit")
If objBtnSubmit Is Nothing Then
Else
AddHandler objBtnSubmit.onclick, AddressOf
myBtnSubmit
End If
Then in sub myBtnSubmit, I run some code to do whatever...
PROBLEM
At some point the windows app stops handling the HTML events that are
being fired (myBtnSubmit does not get executed). After the win app
stops responding to HTML events, the javascript in the HTML page
continues to run correctly -- so I'm now weary of MSHTML's ability to
handle the events that are being raised. The handler seems to quit
working if I fire the onclick event quickly and repeatedly.
Is this a known issue with MSHTML handling HTML events? Is there
something that could be breaking this call back?
Any thoughts on the cause of this problem and/or viable solutions
would be appreciated.
Thanks for your attention to this... celoftis