- # Add the JavaScript file only if we have an index.
- # Unfortunately, init_out is called after css_lines, so as a workaround
- # here we have to check again for the existence of an index...
- my $ix = main::get_index ("cp");
- $have_index_entries = (scalar $ix > 0);
- my $reldir = "";
- $reldir = "../" unless $bigpage;
- if ($have_index_entries) {
- $Texi2HTML::THISDOC{'CSS_LINES'} .= "<script language=\"JavaScript\" src=\"${reldir}lily_search.js\"></script>\n";
+ if ($ENV{'AJAX_SEARCH'} == 1) {
+ # Add the JavaScript file only if we have an index.
+ # Unfortunately, init_out is called after css_lines, so as a workaround
+ # here we have to check again for the existence of an index...
+ my $ix = main::get_index ("cp");
+ $have_index_entries = (scalar $ix > 0);
+ my $reldir = "";
+ $reldir = "../" unless $bigpage;
+ if ($have_index_entries) {
+ $Texi2HTML::THISDOC{'CSS_LINES'} .= "<script language=\"JavaScript\" src=\"${reldir}lily_search.js\"></script>\n";
+ }