Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WEB BROWSER control
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00711460
Message ID:
00712288
Views:
9
>>>
>>>Right now, I have control of the HTML, and it IS a submit button. But this is a testing environment only. The real deal I won't have access to the HTML. I've even tried the _webbrowser4 control from the _webview.vcx and that still doesn't fire the BeforeNavigate2 method either.
>>
>>Can you post the HTML? Something doesn't sound right - if it's navigating to a new page, BeforeNavigate2 should definitely fire.
>
>I had jury duty (or rather jury selection) today. I'll try to send you the pertinent code tomorrow. I've got the actual trial starting on Friday. :(

Well, I'm going out of town in a few hours and won't be back until the 26th. Hopefully someone else can jump in here and help you out. One idea, assuming you can dictate what type of HTML/JavaScript code can go into the page (and event binding isn't an option), is to pass an object reference from a VFP object into the HTML page via JavaScript, and call it from an onClick event. The JavaScript might look like (I haven't tested this at all, so the syntax might be wrong):
<script>
var oVFP

function CallVFP()
{
   if (oVFP!=null)
   {
     oVFP.SomeMethod();
   }
}

function SetVFP(toVFP)
{
   oVFP = toVFP;
}

</script>

<input type="submit" onClick="CallVFP();">
Then, once the page has loaded, your VFP code calls the SetVFP script method with an object reference.

However, it still seems like something might be wrong with the HTML - I can't think of a good reason BeforeNavigate2 wouldn't fire if the actual page is changing. If you can't find an answer here, you might want to post this over on the Web Connection forum http://www.west-wind.com/wwthreads - like the UT, there are a lot of smart & helpful people there who can probably help.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform