Trigger change event with geckofx

Discuss building things with or for the Mozilla Platform.
Post Reply
Precision999
Posts: 1
Joined: February 18th, 2020, 1:18 pm

Trigger change event with geckofx

Post by Precision999 »

Hi

I'm trying out geckofx with vb.net at the moment to embed the browser in a form, and from there navigate to a url, enter text in a few form fields, click buttons and the like.

All going well until I tried to use a dropdown box on a web site. I can assign a text value to it with a bit of javascript. This selects the 4th option from dropdown called DDLStatus:

Code: Select all

GeckoWebBrowser1.Navigate("javascript:void( document.getElementById( 'DDLStatus' ).selectedIndex='4' )")
What I can't do though is trigger the change event which usually fires when the you pick an option from the dropdown.

Is there a simple way to do this? I thougt something like this would work, but no joy:

Code: Select all

GeckoWebBrowser1.Navigate("javascript:void( document.getElementById( 'DDLStatus' ).change() ) ")
(I'm afraid I'm new to javascript as well!)

Thanks for reading!
Post Reply