Skip Menu |

This queue is for tickets about the Javascript-Menu-Full CPAN distribution.

Report information
The Basics
Id: 6442
Status: resolved
Priority: 0/
Queue: Javascript-Menu-Full

People
Owner: Nobody in particular
Requestors: hottamales [...] rogers.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.01
Fixed in: (no value)



Subject: Menus do not work when run from Apache but do on IIS
A modified example works great on Windows with IIS but fails on Solaris with Apache. On Solaris only the text of the menus is rendered. Same browser used for both tests IE6. Example code: #! /usr/bin/perl -w use strict; use Apache::Reload; use Tree::Numbered; use Tree::Numbered::DB; use Javascript::Menu; use DBI; use CGI; my $cgi = CGI->new; my $action = sub { my $self = shift; my ($level, $unique) = @_; my $value = $self->getValue; return "document.getElementById('caption_${unique}').innerHTML='$value';"; }; my $tree1 = Javascript::Menu->new(value => 'Hello', action => $action); $tree1->append(value => 'first'); $tree1->append(value => 'second'); $tree1->nextNode->append(value => 'child1'); my $tree2 = Javascript::Menu->new(value => 'World', action => $action); my $branch1 = $tree2->append(value => 'first'); my $branch2 = $tree2->append(value => 'second'); my $branch3 = $tree2->append(value => 'third'); my $branch4 = $tree2->append(value => 'forth'); $branch1->append(value => 'child1'); $branch1->append(value => 'item 2 of child 1'); $branch1->append(value => 'item 2 of child 1'); $branch1->append(value => 'item 2 of child 1'); $branch1->append(value => 'item 2 of child 1'); $branch1->append(value => 'item 2 of child 1'); $branch2->append(value => 'child2'); my $css = '/css/menu.css'; print $cgi->header(-charset => "windows-1255"); print $cgi->start_html( -xbase => "http://192.168.0.124/", -encoding => "windows-1255", -lang => "en", -style => { -src=>$css }, -script => {-language => 'Javascript', -code => $tree1->baseJS()} ); print $cgi->table( { -cellpadding=>"0", -cellspacing=>"1" }, $cgi->Tr( $cgi->td( $tree1->getHTML(no_ie => 0) ), $cgi->td( $tree2->getHTML(no_ie => 0) ), ), ); #print $cgi->div($tree1->getHTML(no_ie => 0), $tree2->getHTML(no_ie => 0) ); print $cgi->p( 'blah blah blah' ); Example CSS in seperate file: .Smenu td a:hover { color: #000000; z-index: 10; font-size: 12px; background: #FFFFFF; } .Smenu { left: 1; visibility: hidden; top: 1; z-index: 10; text-decoration: none; position: absolute; background: #FFFFFF; font-size: 12px; border: solid 1px #000000; } .Smenu a:link, .Smenu a:visited { text-decoration: none; background: #FFFFFF; font-size: 12px; } .caption { width: 100px; border: solid 1px #000000; color: #FFFFFF; text-decoration: none; background: #0000FF; font-size: 12px; font-weight: bold; z-index: 10; } .caption a:link, .caption a:visited { width: 10%; color: #FFFFFF; text-decoration: none; background: #0000FF; font-size: 12px; font-weight: bold; } .Mmenu { left: 1; visibility: hidden; top: 1; z-index: 10; text-decoration: none; position: absolute; background: #FFFFFF; font-size: 12px; border: solid 1px #000000; } .Mmenu a:link, .Mmenu a:visited { text-decoration: none; background: #FFFFFF; font-size: 12px; } .Mmenu td a:hover { color: blue; z-index: 10; background: #FFFFFF; font-size: 12px; }
From: hottamales [...] rogers.com
Please disregard - I jumped the gun here. The issue was relative paths not working on Apache. Had to fully qualify the path to the CSS file.