<div dir="ltr">Thanks Stefano, it works.<div><br></div><div>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....</div>
<div><br></div><div>Iain</div><div><br></div><div><br><br><div class="gmail_quote">On Sat, Jul 4, 2009 at 8:30 PM, Stefano Mazzocchi <span dir="ltr"><<a href="mailto:stefano@metaweb.com">stefano@metaweb.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Iain Sproat wrote:<br>
> What's the correct path for referencing javascript files from other acre<br>
> apps on the client side?<br>
><br>
> I'm using acre and trying to reuse the date javascript library from the<br>
> freebase libraries app. I've got the following line in my client side<br>
> code, <script type="text/javascript"<br>
> src="<a href="http://libraries.apps.freebase.dev.freebaseapps.com/date" target="_blank">http://libraries.apps.freebase.dev.freebaseapps.com/date</a>"></script>.<br>
> But this doesn't seem to work.<br>
<br>
</div>Right, this doesn't work because that file is marked as a 'script' which<br>
means that if called directly, acre will load it and *execute it* and<br>
then return you the results of that execution, which is empty since that<br>
script doesn't write anything to the output.<br>
<div class="im"><br>
> The script can be seen<br>
> at <a href="http://acre.freebase.com/#app=/freebase/apps/libraries&file=date" target="_blank">http://acre.freebase.com/#app=/freebase/apps/libraries&file=date</a><br>
> <<a href="http://acre.freebase.com/#app=/freebase/apps/libraries&file=date" target="_blank">http://acre.freebase.com/#app=/freebase/apps/libraries&file=date</a>><br>
> I can't use the acre.require command as it is on the server side.<br>
<br>
</div>I've made a copy of that file and marked it as 'file' instead of script,<br>
so that Acre will just send it back to you instead of executing it. Find<br>
it at<br>
<br>
<a href="http://libraries.apps.freebase.dev.freebaseapps.com/date_client_side" target="_blank">http://libraries.apps.freebase.dev.freebaseapps.com/date_client_side</a><br>
<br>
Hope this helps.<br>
<br>
--<br>
Stefano Mazzocchi Application Catalyst<br>
Metaweb Technologies, Inc. <a href="mailto:stefano@metaweb.com">stefano@metaweb.com</a><br>
-------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Developers mailing list<br>
<a href="mailto:Developers@freebase.com">Developers@freebase.com</a><br>
<a href="http://lists.freebase.com/mailman/listinfo/developers" target="_blank">http://lists.freebase.com/mailman/listinfo/developers</a><br>
</blockquote></div><br></div></div>