[X3D-Public] Is there a 'base url' for VRML/X3D browsers?
dave at realmofconcepts.com
Mon Aug 1 02:34:59 PDT 2011
I'm using Contact, I'm not seeing this, at least as anything standard,
am I missing it?
What I need to know is the 'base url', that is, the domain and path,
that my content is served from. Or more precisely, I DON'T want to know
it, I'd like to be able to use relative paths, specifically for using
createX3DFromURL and such.
Say I have a script that calls thus:
Browser.createX3DFromURL ('generate.php', this, 'loaded');
Where does the 'generate.php' file need to be? My experiments seem to
indicate that it is on the client machine. Meaning, if I serve a page
containing the plugin from www.mydomain.com, I expect that it will call
http://www.mydomain.com/generate.php, but instead it seems to want
http://localhost/generate.php, I'm guessing because it has been cached
to the local drive and hence runs from there.
Is there a policy on this?
I do see that Contact provides a script extension that I could parse to
find the current url. How widely are such API's out there? Xj3D,
FreeWRL, Instant, etc?
More information about the X3D-Public