Call Javascript Function

Posted on 2006-05-26
Last Modified: 2012-05-05
I'm using a windows form to parse a webpage, and I need to trigger a javascript function on the page from my code.

How can I call the function?

Question by:MortgageBanker
    LVL 11

    Expert Comment

    do you use the browser control for your webpage?

    Author Comment

    Do you mean the Microsoft Internet Explorer ActiveX control? I don't use it - should I?
    LVL 11

    Accepted Solution

    no, but at least you will need to use the mshtml object.
    with that, there is a HTMLWindow2Class, which has a execScript function.

    you can run java scripts with that function, if you have loaded the page with the open function first.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now