0

Head element

asked 2009-05-28 08:32:55 +0800

nhack gravatar image nhack
63 1

Does anybody know how can I obtain the HEAD element of a page so that I can insert a SCRIPT tag in it?

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-05-28 11:08:11 +0800

edudant gravatar image edudant
219 1 1 1
zk.datalite.cz

Maybe script zk directive should be sufficient for you?

Look at ZK Wiki

link publish delete flag offensive edit

answered 2009-05-28 11:49:26 +0800

nhack gravatar image nhack
63 1

I have tried using Script class to insert a script, but the script is not inserted in the Head element is inserted somewhere in the body.

P.S. I am not using zul files, i'm using only Java richlets.

link publish delete flag offensive edit

answered 2009-06-02 03:43:21 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

Please refer to this thread to render your javascript to Head instead of body.

/robbie

link publish delete flag offensive edit

answered 2009-06-02 10:49:03 +0800

tomyeh gravatar image tomyeh
610 1 3
http://blog.zkoss.org ZK Team

If you are using 3.6.2 (freshly available now), you can use the new introduced script directive (Feature 2788162) as follows.

<?script src="/foo.js?"?>

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-05-28 08:32:55 +0800

Seen: 192 times

Last updated: Jun 02 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More