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.