[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

executing (web page generated) javascript from vb (WebBrowser1.Document.InvokeScript) - (using vb 2008 express)

Asked by cfinley01 in Visual Basic Programming, JScript, HTMLkit

Tags: VB Javascript WebBrowser1.Document.InvokeScript

I'm trying to automate a process on a web page

Using the following command I can start an automated download (works fine)
WebBrowser1.Navigate("javascript:formAction('download')")

Calling the javascript function does not work
WebBrowser1.Navigate("javascript:CheckAll('theForm')")

I suspect I need to use something like this: (Does not work)
WebBrowser1.Document.InvokeScript("CheckAll(this.form)")

If I use WebBrowser1.Document.InvokeScript("CheckAll")
It executes but, I get an error message
"abinumber is null or not an object"

I  know just enough vb.net to be dangerous

Here is the javacode from the website that I want to execute

function CheckAll(theForm) {
  for (i = 0; i < theForm.abinumber.length; i++) {
    if (theForm.check_all.value == "  All  ")
      theForm.abinumber[i].checked = true;
    else
      theForm.abinumber[i].checked = false;











[+][-]07/13/09 04:17 AM, ID: 24838667Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/13/09 05:05 AM, ID: 24838890Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/13/09 03:43 PM, ID: 24844722Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/14/09 01:08 AM, ID: 24847135Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/18/09 01:25 AM, ID: 24885243Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625