Web Automation - running Java Script

Hi
I am automating some daily tasks that I perform on the web.  All is well except that I need to run this one line of java code.

(javascript:__doPostBack('_ctl0$contentPlaceHolder$dgDocumentsByTransaction$_ctl19$nextButton',"')

I paste the code above in the address bar in IE, and the Java code runs perfectly. How do I execute this java code in vb.net 2008.

I was thinking something like:
Me.WebBrowser1.Navigate("javascript:__doPostBack('_ctl0$contentPlaceHolder$dgDocumentsByTransaction$_ctl19$nextButton',""')")

but WebBrowser1.Navigate is not the right method to fire this event.

Thanks!
pandkyonAsked:
Who is Participating?
 
pandkyonConnect With a Mentor Author Commented:
got it to work:
WebBrowser1.Navigate("javascript:__doPostBack('_ctl0$contentPlaceHolder$dgDocumentsByTransaction$_ctl19$nextButton','')")

it turned out to be a single quote ' double quote issue.  ','')")
0
 
pandkyonAuthor Commented:
update:  I did try this -

WebBrowser1.Document.InvokeScript("javascript:__doPostBack('_ctl0$contentPlaceHolder$dgDocumentsByTransaction$_ctl19$nextButton','')")

But it didn't do anything - no errors, nor did the the webpage update with new info.      

Again, this is odd, but when I paste this code in the IE address bar, the java code executes:
(javascript:__doPostBack('_ctl0$contentPlaceHolder$dgDocumentsByTransaction$_ctl19$nextButton',"')
0
 
gordon_vt02Commented:
Just an FYI in case you have more questions later.  Java and Javascript are two different languages.  You'll have better luck getting answers if you put Javascript questions into the Javascript zone.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.