0

Is there a way to use VB.NET to close MessageBox controls created by JavaScript in VB.NET webbrowser? I do not want to disable JavaScript in the webbrowser, just to close the MessageBox controls (like clicking their "X" button). I could not get help from search engines. Help appreciated.

keenthinker
  • 7,645
  • 2
  • 35
  • 45
Abbas1999
  • 395
  • 1
  • 9
  • 27

1 Answers1

0

Vb.net is serverside and rendered before javascript as the javascript is client side and rendered on browser. So there is not such way closing alert pop up via server side code.

Neither it is possible via jquery on client side

asdf_enel_hak
  • 7,474
  • 5
  • 42
  • 84
  • Then is it possible to close other application's MessageBox from VB.NET? – Abbas1999 Oct 18 '14 at 07:45
  • I am also thinking probably, if there is a way to detect that a MessageBox is opened, then VB.NET could click "enter" to close it; correct? – Abbas1999 Oct 18 '14 at 07:48
  • Nope, if such action is possible this could be done via javascript. However as mentioned [here](http://stackoverflow.com/questions/23485086/programmatically-close-alert-in-javascript) and [here](http://stackoverflow.com/questions/15466802/how-can-i-auto-hide-alert-box-after-it-showing-it), that is not possible – asdf_enel_hak Oct 19 '14 at 19:21