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

Re: Question about nested navbars




> Copy the definition of <javascript> from wml::std::tags and enclose the
> <script>...</script> block between <head> and </head> if you use the
> wml::std::page module.  If you have your own layout, divert the
> javascript code into the HEAD section.

Since I have my own template file, I gave this second solution a
try. I changed tags.wml by adding a <divert HEAD> ... </divert> brace
inside the javascript tag:

#
#   Support-Tag for protected Client-Side JavaScript
#
<define-tag javascript endtag=required>
<divert HEAD>

[...]

</divert>
</define-tag>


In my template file, I added <dump HEAD> inside <head> ... </head>

The Javascript code does indeed all end up in the head, but it really is
*all* the javascript code, meaning both the code for the English and the
German Javascript buttons...

 
> IMHO the best solution is to let <javascript> check whether the <head>
> tag is defined and is a complex tag (with <symbol-info>). If so, write 
> <head><script>....</script></head>, otherwise just write the script
> block.

Would this solution solve the problem and only include the code for the
current language? I'm asking because this is getting pretty much involved
for me :-)

Stephan


--
Stephan Petersen                           sp@gtt.lth.rwth-aachen.de

>-=-=-=- Visit GTT's Technical Thermochemistry Web Page at =-=-=-=-<
>-=-=-=-      http://gttserv.lth.rwth-aachen.de/gtt/       =-=-=-=-<

______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com