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

Re: Javascript missing



Hello,

sorry for not writing so long, debugging took me so long! :-)
Well, *yippie :-D* I coped without modifying the wml installation files.
I didn't find the bug though, but I had another project where this feature
worked, so I took the main template file from there, copied it and
transformed it back to the original. OK, that's quite a hard way, but in
the end ... it worked. ;-) If you want an example set of files from the
other project, have a look @ my hp under www.michael-kress.de/tmpl
I hope, this will survive the next major releases ... :)
Thanx anyways!
Greetings - Michael


On Thu, 8 Feb 2001, Jean-Michel Sauvage wrote:

> Michael Kress wrote:
> 
> > Hello,
> Hello !
> 
> > generated, while using sub navbars.
> > I'm just getting errors like:
> > ------------------------------------------------------------------------------------------
> > JavaScript Error:
> > file:/var/local/offshore/aktuelle_Projekte/mohme/version_0_3/nodistr/wml/service-al.html,
> > line 93:
> > nb_imgOver is not defined. 
> 
> > Has anybody got any clue for that behaviour ? What can I do ?
> > 
> 
> this problem seems to be complex :
> 
> 1) in /usr/lib/wml/include/des/navbar.wml file, there's a macro : 
> <define-tag navbar:jsfuncs>
> at the end of this macro there is this line :
> <define-tag navbar:jsfuncs></define-tag>
> 
> so the JS code will be generated one time and only once ;
> 
> 2) in /usr/lib/wml/include/std/tags.wml you'll find <javascript> macro.
> the JS code is diverted with <head> tag (and [LANG_* ...)
> 
> so, JS code is diverted one time in page head where your (sub)navbar is 
> define !
> 
> if you define <snb> before <page> tag  and if you have a .wml file per 
> final .html page, or if you have a multipages .wml, your JS code may be 
> diverted in a wrong <head> (you can debug this after pass 3)
> 
> a solution is to copy the <javascript> define-tag to make your own (eg 
> MK_javascript) and modify the navbar:jsfuncs (un)define-tag (the kind of 
> solution depends on multipages use or not)
> 
> but it's not finished, there's also another problem if you use 
> multipages features :
> you will have to modify /usr/lib/include/std/page.wml :
> <head> and <title> definitions ends with :##}
> replace it with :#WML_PAGE_HEAD_<get-var __std_page_cnt />#}
> if you want JS code correctly diverted to each page_head
> 
> 
> > Thanks for any helpful comment!
> > 
> you're welcome
> 
> Jean-Michel Sauvage
> 
> ______________________________________________________________________
> Website META Language (WML)                www.engelschall.com/sw/wml/
> Official Support Mailing List                   sw-wml@engelschall.com
> Automated List Manager                       majordomo@engelschall.com
> 

-- 
Michael Kress / kress@hal.saar.de / coroner@irc
http://www.michael-kress.de
To increase system performance press CTRL+D now.
P E N G U I N S   A R E   C O O L.

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