Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

[Include] Interpolating Javascript

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


sam at westbranchresort

Apr 29, 2008, 4:51 AM

Post #1 of 3 (138 views)
Permalink
[Include] Interpolating Javascript

Ic 5.5.1

I am trying to include an external js file which needs to be interpolated
and I would like to verify what I am reading in the docs.

Js script resides http://mydomain.com/js/script.js

Code I am using

[include file "/js/script.js"]

This should interpolate the JS and have it available the same as

<script type="text/javascript"
src="http://www.mydoamin.com/js/script.js"></script>

Which would not be interpolated obviously, not working for me just trying to
clarify my steps.

Thank You
-Sam




_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


docelic at spinlocksolutions

Apr 29, 2008, 4:59 AM

Post #2 of 3 (128 views)
Permalink
Re: [Include] Interpolating Javascript [In reply to]

On Tue, 29 Apr 2008 07:51:10 -0400
Sam Batschelet <sam[at]westbranchresort.com> wrote:

> Ic 5.5.1
>
> I am trying to include an external js file which needs to be
> interpolated and I would like to verify what I am reading in the docs.
>
> Js script resides http://mydomain.com/js/script.js
>
> Code I am using
>
> [include file "/js/script.js"]

[include file="/js/script.js"] (note the equal sign)

or just

[include /js/script.js]

Also note that the include path is not an URL, but a real
path on the disk, relative to catalog root directory.

So your example above probably won't work in any scenario, as
there's no /js directory on the system nor you'd be able to
access absolute paths from catalog context.

If your js code is in /var/www/js/, then you would create
a symlink to it from your catalog root, such as

cd /path/to/catalog
ln -sf /var/www/js .

and then use

[include js/script.js]

in your pages.

-doc

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


sam at westbranchresort

Apr 29, 2008, 6:10 AM

Post #3 of 3 (127 views)
Permalink
Re: [Include] Interpolating Javascript [In reply to]

On 4/29/08 7:59 AM, "Davor Ocelic" <docelic[at]spinlocksolutions.com> wrote:

> On Tue, 29 Apr 2008 07:51:10 -0400
> Sam Batschelet <sam[at]westbranchresort.com> wrote:
>
>> Ic 5.5.1
>>
>> I am trying to include an external js file which needs to be
>> interpolated and I would like to verify what I am reading in the docs.
>>
>> Js script resides http://mydomain.com/js/script.js
>>
>> Code I am using
>>
>> [include file "/js/script.js"]
>
> [include file="/js/script.js"] (note the equal sign)
>
> or just
>
> [include /js/script.js]
>
> Also note that the include path is not an URL, but a real
> path on the disk, relative to catalog root directory.
>
> So your example above probably won't work in any scenario, as
> there's no /js directory on the system nor you'd be able to
> access absolute paths from catalog context.
>
> If your js code is in /var/www/js/, then you would create
> a symlink to it from your catalog root, such as
>
> cd /path/to/catalog
> ln -sf /var/www/js .
>
> and then use
>
> [include js/script.js]
>
> in your pages.
>
> -doc
>
Doc thanks that worked very well like you said I was using the www root not
catalog.



_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.