[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Test 2 - is this thing on?



RA Jones wrote:

> But how would I get the script to pass the url to the j/s function,
> unless the equivalent of "/some/url" is passed as an interpolated
> variable eg:
> 
> $('#bad_nhsno').load(
>   $url, { # <= using TT2 'INTERPOLATE' function
>     etc,
>   }
> );

wrap that bit into a function that you have in a .js file. Something like

  function do_cool_stuff(url)
    $('#bad_nhsno').load(
      url, { # <= using TT2 'INTERPOLATE' function
      etc,
    }
  );

And then in your template when you want to use it, do this:
  do_cool_stuff([% url %]);

-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.