Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7438273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:31:41+00:00 2026-05-29T10:31:41+00:00

Had a Windows Forms app using a WebBrowser control (.NET 4) to load a

  • 0

Had a Windows Forms app using a WebBrowser control (.NET 4) to load a web page that communicated with the app. I had a call to InvokeScript() to call a Javascript routine in the web page at one point.

Now things have been “updated”, and jQuery is now being used. So instead of having a OnVenueSelected() function to call, it’s now some $.city.venue.onVenueSelected: function(param) oddity.

Simply changing my call from InvokeScript("OnVenueSelected", new object[] { params }) to InvokeScript("$.city.venue.onVenueSelected", new object[] { params }) did not work. I don’t get any observable errors or exceptions, but the logic in the call is not invoked.

Some digging around had me trying to use eval as the call and passing the function name and parameters as the string to eval. That didn’t work either.

Is there a known way to invoke a function that’s embedded in a couple of layers of jQuery magic?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:31:42+00:00Added an answer on May 29, 2026 at 10:31 am

    OK – I get to answer my own question. Thanks in part to the answer by at How to call a jQuery function from .NET WebBrowser control using InvokeScript()?, I was able to change my call to the jQuery function to

    string[] codeString = { String.Format(" {0}('{1}') ", @"$.city.venue.onVenueSelected", result.ToString()) };
    this.myBrowser.Document.InvokeScript("eval", codeString);
    

    Amazingly enough, this seems to be working.

    In my case, the result variable is of type bool (in case that matters to anyone).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to design a Windows Forms application. By default, .NET had put Tahome
Why are companies still using Windows Forms and WPF applications instead of web applications?
I am writing a small .NET Windows Forms app, and I use the built-in
I recently had this idea to create a C# Windows Form App that enables
I've had a Windows app in production for a while now, and have it
Say if you had to develop a huge windows desktop app what language/technology you
I'm writing an AJAX web app that uses Comet/Long Polling to keep the web
I had a C# .NET windows application having C# user interface and all the
I am writing a .Net COM DLL that runs inside a native Windows application.
What is the best approach to implementing authorisation/authentication for a Windows Forms app talking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.