I want to invoke Javascript function in Document. Basically I use Webbrowser Control to Navigate to specified site and put value on page and now I want to press Submit Button.
The Html Code for Button in targeted page is as :
| id='Default' class='LargeBtnTextActive' href='javascript:pageLevelSubmit(this, "find","true", "9447");'oprscope='single' > | |
| Submit |
Thanks,
VIkram
VikramPosted Mar 23, 2010, 5:14 AM
Actually requirement is to open one page in back end. For this I use WebBrowser Control to Navigate to Perticular Web Site. And by using HtmlDocument I can Fill one value into the Textbox and Click Submit Button which give me another Page which contains data in html format. I read HtmlTables and fetch Data from Html Tables.
Above code is code which I got after navigating to main Page. I want to execute that Function which gives me another page which contain Data.
Thanks
Amit ChoudharyPosted Mar 23, 2010, 4:51 AM
if you want to call java script function then you have to specify in an event of control.
id='Default' class='LargeBtnTextActive' href='javascript:pageLevelSubmit(this, "find","true", "9447");'oprscope='single' >
Here the href is not the event.
you can specify this function onClick of this link.
id='Default' class='LargeBtnTextActive' href="#" onClick='javascript:pageLevelSubmit(this, "find","true", "9447");' oprscope='single' >
Please mark as answer if it helps.