> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
> On Behalf Of Martin S.
> Sent: Friday, October 31, 2008 12:37 PM
> To: Trac Users
> Subject: [Trac] Re: Adding script tag with inline javascript in
> IRequestFilter
> 
> 
> On Oct 31, 7:08 pm, "Noah Kantrowitz" <[EMAIL PROTECTED]> wrote:
> > The easiest way to do this is to add a non-static script file. Put
> > differently, do add_script(req, '/myplugin/myplugin.js') and then
> implement
> > a request handler for that URL that returns the JS you want.
> I knew someone would tell me this, it was one of my thought also, but
> I was trying to avoid the effort.
> 
> I found an hack for me problem now:
> Because I only have to provide one hex number to the static script I'm
> using now
> an general link tag using add_link which has the number in the title
> attribute and a special class tag.
> The JS code then get's the data using jQuery:
>    var hexcode = $("link.myclassname").attr('title');
> Works good.
> 
> The downside is the link tag with the non-standard 'rel'-ation
> attribute and an empty 'href', not sure if this is 100% XHTML strict
> compatible, but shouldn't be any problem.
> 

The hack I used to use in 0.10 was to hide markup in the footer text (since
that’s arbitrary markup sent to the template). Not sure how well it works in
0.11.

--Noah



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to