more trailing_javascript
authorArt Cancro <ajc@citadel.org>
Fri, 3 Oct 2008 15:07:26 +0000 (15:07 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 3 Oct 2008 15:07:26 +0000 (15:07 +0000)
webcit/tabs.c

index 78d2954ecdd4e5dd0eb439b9877bf752fa73a008..69547e2640b9456950ff0cc69d5cd25ee85c878b 100644 (file)
@@ -12,7 +12,7 @@
 void tabbed_dialog(int num_tabs, char *tabnames[]) {
        int i;
 
-       wprintf("<script type=\"text/javascript\">                                              "
+       StrBufAppendPrintf(WC->trailing_javascript,
                "var previously_selected_tab = '0';                                             "
                "function tabsel(which_tab) {                                                   "
                "       if (which_tab == previously_selected_tab) {                             "
@@ -24,7 +24,6 @@ void tabbed_dialog(int num_tabs, char *tabnames[]) {
                "       $('tabtd'+which_tab).className = 'tab_cell_label';                      "
                "       previously_selected_tab = which_tab;                                    "
                "}                                                                              "
-               "</script>                                                                      \n"
        );
 
        wprintf("<table id=\"TheTabs\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"