[Developers] paths for referencing javascript files from client side in acre
Iain Sproat
iainsproat at gmail.com
Sat Jul 4 17:04:15 UTC 2009
Thanks Stefano, it works.
Any idea how to delete files in acre? As a workaround I had copied and
pasted the code into a file in my app, and now it's not needed I'd like to
delete the file, but can't seem to find the button....
Iain
On Sat, Jul 4, 2009 at 8:30 PM, Stefano Mazzocchi <stefano at metaweb.com>wrote:
> Iain Sproat wrote:
> > What's the correct path for referencing javascript files from other acre
> > apps on the client side?
> >
> > I'm using acre and trying to reuse the date javascript library from the
> > freebase libraries app. I've got the following line in my client side
> > code, <script type="text/javascript"
> > src="http://libraries.apps.freebase.dev.freebaseapps.com/date
> "></script>.
> > But this doesn't seem to work.
>
> Right, this doesn't work because that file is marked as a 'script' which
> means that if called directly, acre will load it and *execute it* and
> then return you the results of that execution, which is empty since that
> script doesn't write anything to the output.
>
> > The script can be seen
> > at http://acre.freebase.com/#app=/freebase/apps/libraries&file=date
> > <http://acre.freebase.com/#app=/freebase/apps/libraries&file=date>
> > I can't use the acre.require command as it is on the server side.
>
> I've made a copy of that file and marked it as 'file' instead of script,
> so that Acre will just send it back to you instead of executing it. Find
> it at
>
> http://libraries.apps.freebase.dev.freebaseapps.com/date_client_side
>
> Hope this helps.
>
> --
> Stefano Mazzocchi Application Catalyst
> Metaweb Technologies, Inc. stefano at metaweb.com
> -------------------------------------------------------------------
>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090704/e4b8f6a3/attachment-0001.htm
More information about the Developers
mailing list