Index: openacs-4/www/blank-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.tcl,v diff -u -r1.35 -r1.36 --- openacs-4/www/blank-master.tcl 6 Dec 2007 18:50:13 -0000 1.35 +++ openacs-4/www/blank-master.tcl 12 Dec 2007 00:06:48 -0000 1.36 @@ -184,25 +184,23 @@ # Concatenate the javascript event handlers for the body tag variable ::template::body_handlers if {[array exists body_handlers]} { - set names [array names body_handlers] - foreach name $names { + foreach name [array names body_handlers] { set event [lindex [split $name ","] 0] -ns_log notice "event $event name $name JS !!!$body_handlers($name)!!!" + # ns_log notice "event $event name $name JS !!!$body_handlers($name)!!!" foreach javascript $body_handlers($name) { - lappend body_handlers($event) "[string trimright $javascript "; "];" - ns_log notice "adding [string trimright $javascript "; "];" + lappend body_handlers($event) "[string trimright $javascript {; }];" } - unset body_handlers($name) } -} -# Now create the event handlers string -foreach {event script} [array get body_handlers] { - append event_handlers " ${event}=\"$script\"" + # Now create the event handlers string + foreach {event script} [array get body_handlers] { + append event_handlers " " $event = \" [join $script { }] \" + } + unset body_handlers } - + # Generate the body headers variable ::template::headers set header ""