Re: Load Javascript on the fly

2007-05-25 Thread chess64
Check out the NiceHead Helper in the bakery. On May 12, 12:53 pm, dom <[EMAIL PROTECTED]> wrote: > Hi everybody. > I wonder if it is possible to load a javascript file outside the > section of the layout. I have only one layout, default.thtml, > as all the calls are Ajax calls. So I have only on

Re: Load Javascript on the fly

2007-05-25 Thread hydra12
You can load scripts from within your views, too. I'm playing with ajax, jquery, and ext.js, and I had similar problems. Put something like this at the bottom of your view: link('myScript.js'); ?> NOTE - you have to but this at the bottom of the view. I tried putting it at the top, but the sc

Re: Load Javascript on the fly

2007-05-25 Thread Pablo Viojo
I use to load javascript files on the fly using a **synchronous** connection (using XMLHttpRequest) sUrl="http://example.com/scriptftoload.js";; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); if ( typeof xmlhttp.overrideMimeType != 'undefined') { xmlhttp.over

Re: Load Javascript on the fly

2007-05-25 Thread John - PostalService
The Head helper is non existant. Do you have a custom helper that you are using? Thanks, John On May 12, 11:08 am, stacey <[EMAIL PROTECTED]> wrote: > You can call like this from the view: > > js('customborders/cb'); ?> > > and you need to include the 'head' helper in your controller: > > var

Re: Load Javascript on the fly

2007-05-12 Thread dom
Thanks a lot. I'll give that a go. Dom On May 12, 8:08 pm, stacey <[EMAIL PROTECTED]> wrote: > You can call like this from the view: > > js('customborders/cb'); ?> > > and you need to include the 'head' helper in your controller: > > var $helpers = array('Html', 'Head'); // html is always needed

Re: Load Javascript on the fly

2007-05-12 Thread stacey
You can call like this from the view: js('customborders/cb'); ?> and you need to include the 'head' helper in your controller: var $helpers = array('Html', 'Head'); // html is always needed On May 12, 12:53 pm, dom <[EMAIL PROTECTED]> wrote: > Hi everybody. > I wonder if it is possible to loa

Load Javascript on the fly

2007-05-12 Thread dom
Hi everybody. I wonder if it is possible to load a javascript file outside the section of the layout. I have only one layout, default.thtml, as all the calls are Ajax calls. So I have only one section... But I don't want to load the whole of my javascript file at once. It would be more sensible