Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27156

Using IE Object to return Javascript Variable

$
0
0
Hello,

I have a website that has a Javascript function called inBoundaries. This function interfaces with a Google Maps API to determine whether a Latitude / Longitude coordinate falls within a defined boundary. So far I have successfully created a Javascript page that returns "Yes" if the Lat/Long coordinates are within the boundary, or "No" if it is not.

I would like to access the page through the Internet Explorer object using VB.Net and determine whether the page is displaying "Yes" or "No", or if there is a way to extract the Javascript variable from the IE object itself. Ultimately, I want to create a variable in my VB.Net code that is either "Yes" or "No" depending on the result of the Javascript function that returns Yes or No. Scraping the website does not seem to be an option, since the function does not actually show up in the HTML source.

My primary question is whether I can get this Yes/No variable from the Javascript function into a VB.Net variable so I can proceed with my code logic after the web call, and the best way of doing that.

A secondary question is whether I will need to disable ActiveX Control protection in IE through code (since there is Javascript running when the page opens), and how I would do that.

Any ideas?


Thank you!

Viewing all articles
Browse latest Browse all 27156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>