On Monday, November 18, 2013 01:06:56 AM RjOllos wrote:
On Monday, November 4, 2013 1:12:54 PM UTC-8, Roger Oberholtzer wrote: [email protected][1]> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > >> On 04.11.2013 13:52, [email protected]_ wrote: >> But I no longer have a body tag. > > Is this another/follow-up question? If so, it was very subtle IMHO. Same question. Just the next step in solving it. Since I don't think I can put a <body> tag in a Trac #!html block, I am not sure how to call a function in the script. In my case it is the init() function in the javascript I have included in the block. Roger If you want the script to be executed on page load, I think you could just use jQuery ready: http://api.jquery.com/ready/[2] You could either put this in OpenLayers.js, or load another file that calls OpenLayers. I have a my javascript in a file I load. It has a function called init() that I want to have called when the HTML block is rendered. I tried adding: $( document ).ready(function() {init()}); All I get is this text in the rendered page... I realize this question is sort of veering away from Trac - except that it is trying to get something to work in the Trac HTML block. -- Yours sincerely, Roger Oberholtzer Ramböll RST / Systems Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 [email protected] ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -------- [1] javascript: [2] http://api.jquery.com/ready/ -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/groups/opt_out.
