Discussion:
webbrowser control hosted inside vfp7
(too old to reply)
rob
2004-02-17 20:44:22 UTC
Permalink
Hi all,

I've looked at window.external in the microsoft script debugger and in
theory it should open up into the hosting application in this case vfp7.
However, it says that window.external is an object but I cannot drill down
or fire a function in my application.
Is there something else I should do to access areas of my app from within
javascript on the page inside the control?

TIA

Rob
Rick Strahl [MVP]
2004-02-18 23:02:21 UTC
Permalink
What re you trying to do exactly?

The easiest way to get a reference back to the parent form or other VFP
object is to pass it to the script page after the page has loaded by calling
a method. I seem to remember wanting to get the hosting container, but that
didn't work right. The main issue is that the hosting container isn't VFP
but the ActiveX wrapper - there may be a way from that container backwards,
but not sure how that works if at all.

There's a sample of how to do the script code bit - all you do is add a
public var to your HTML page, then have a method that you pass in whatever
object you want to pass and then store in this public var. You can hten use
the public var from script code to manipulate the calling app.

There's a bunch of info on this here:
http://www.west-wind.com/presentations/shellapi/shellapi.asp


However! I would advise you to carefully think about this approach. It
works, but it gets really convoluted. There are usually better ways to
manage the UI than doing this inside out approach.


Hope this helps,

+++ Rick ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
Post by rob
Hi all,
I've looked at window.external in the microsoft script debugger and in
theory it should open up into the hosting application in this case vfp7.
However, it says that window.external is an object but I cannot drill down
or fire a function in my application.
Is there something else I should do to access areas of my app from within
javascript on the page inside the control?
TIA
Rob
Rob J
2004-03-01 14:05:03 UTC
Permalink
Rick,

Thanks for the info, I've dropped you a email in reply
Regards

Rob
Post by Rick Strahl [MVP]
What re you trying to do exactly?
The easiest way to get a reference back to the parent form or other VFP
object is to pass it to the script page after the page has loaded by calling
a method. I seem to remember wanting to get the hosting container, but that
didn't work right. The main issue is that the hosting container isn't VFP
but the ActiveX wrapper - there may be a way from that container backwards,
but not sure how that works if at all.
There's a sample of how to do the script code bit - all you do is add a
public var to your HTML page, then have a method that you pass in whatever
object you want to pass and then store in this public var. You can hten use
the public var from script code to manipulate the calling app.
http://www.west-wind.com/presentations/shellapi/shellapi.asp
However! I would advise you to carefully think about this approach. It
works, but it gets really convoluted. There are usually better ways to
manage the UI than doing this inside out approach.
Hope this helps,
+++ Rick ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
Post by rob
Hi all,
I've looked at window.external in the microsoft script debugger and in
theory it should open up into the hosting application in this case vfp7.
However, it says that window.external is an object but I cannot drill down
or fire a function in my application.
Is there something else I should do to access areas of my app from within
javascript on the page inside the control?
TIA
Rob
Loading...