[X3D-Public] Is there a 'base url' for VRML/X3D browsers?

Dave A dave at realmofconcepts.com
Mon Aug 1 09:34:16 PDT 2011


Lauren,

I'm running Contact in a web page served remotely, but the path it's 
using (for relative urls) is local.
So I don't think of it as running locally because it sits on a web page 
that came from outside.

Dave

On 8/1/2011 3:17 AM, GLG wrote:
> You seem to have this right Dave, but I suspect you
> are attempting to run it locally thus the localhost
> path. Loading your world from an online domain will
> produce the right path. Place your php file in the same
> directory as your world or use things like ../phppath/.
> As for your other question about base path you can
> create your own SFString field. That will do the trick.
>
> Hope this helps,
> Lauren
>
>     _____  ___      __   __ ___  ______   ___   ___   ___
>    /__  / / _ \    /  | / // _ \/_  __/  / _ \ / _ \ / _ \
>   _/_  / / // /   / /||/ //  __/ / /    / ___//   _// // /
> /____/ /____/   /_/ |__/ \___/ /_/    /_/   /_/\_\ \___/
> ______________________________________________________
>   * * Interactive Multimedia - Internet Management * *
>    * * Virtual Reality - Application Programming  * *
>     * 3D Net Productions  www.3dnetproductions.com *
>
>> -----Original Message-----
>> From: x3d-public-bounces at web3d.org [mailto:x3d-public-
>> bounces at web3d.org] On Behalf Of Dave A
>> Sent: Monday, August 01, 2011 5:35 AM
>> To: 'x3d public mailing list'
>> Subject: [X3D-Public] Is there a 'base url' for
>> VRML/X3D browsers?
>>
>> Hello again,
>>
>> 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?
>>
>> Thanks
>>
>> Dave A.
>>
>> _______________________________________________
>> X3D-Public mailing list
>> X3D-Public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1390 / Virus Database: 1518/3801 - Release Date: 07/31/11
>
>
>



More information about the X3D-Public mailing list