Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web browser, SVG, and inter-document communications
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01216097
Message ID:
01216109
Views:
16
>All
>
>I feel like replacing the native objects on the main form of my application with a web browser control displaying SVG objects. If I can get all the events to hook up properly, I will be able to have a replica of my database + interface in static HTML pages, with the same look and feel, that I can distribute to users who consequently will not need the database engine and complex install package to surf through data.
>
>I have successfully:
>
>1. Exported data to an XML file
>2. Created a XSD file that processes the XML and generates SVG
>3. Added a Javascript section to the XSD file so the SVG objects have events
>4. Disabled the default shortcut menu of the Adobe plug-in (in IE).
>
>The code is a bit like this:
>
>
>oXMLdoc = CreateObject("MSXML2.DOMDocument.3.0")
>oXSLdoc = CreateObject("MSXML2.DOMDocument.3.0")
>oXMLdoc.loadxml('... some XML data ...')
>oXSLdoc.loadxml('... XSL file ...')
>cSVG = oXMLdoc.transformNode(oXSLdoc)
>* cSVGfile is a file destination on disk
>STRTOFILE(cSVG, cSVGfile)
>THISFORM.Webrowser1.Navigate(cSVGfile)
>
>
>I can get data back out of the browser by using the browsereval() function in javascript. This passes a string upwards where I can intercept it in VFP and display, for example, a VFP shortcut menu at the right coordinates.
>
>The problem is how to send data back from VFP to the SVG document, e.g. something like this:
>
>
>THISFORM.Webrowser1.document.InvokeScript("SomeJSproc()", "someparam")
>
>
>It doesn't work. SVG sites call this the 'inter-document communication problem' and no-one seems to have a solution. Or do they?
>
>John Burton

Not to be a party pooper in any way but you do realise that Adobe is dropping their SVG viewer and thus you are going to be relying on third party vendors to keep this alive as a viable technology?

http://www.adobeforums.com/cgi-bin/webx/.3bc189bf

It sounds like you are trying to achieve what Adobe Flex and MS WPF are going for. Maybe you should look at them. WPF uses XAML, which is just XML, to describe the interface. A VFP app could spit that out.
Cheers,
Jamie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform