Trying to add a Java menu. Trying to add a Java menu.
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Trying to add a Java menu.

Started by Naesstrom, May 20, 2007, 07:08:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Naesstrom

Hi everyone!

I'm trying to help a friend to add coppermine to her site, she's been using a nice Javascript menu on her old photoalbum that she wants to use in the coppermine theme to so I tried to copy the top part of her old site to the theme...

The strange thing is that it looks right when I preview the html on my PC or the template.html file directly: http://lindaofsweden.naesstrom.net/vagabond/gallery/themes/fiplain/template.html with the menu over the logo, but if I go to the gallery it doesn't show up!

At first I only had the .js files in the themes/fiplain directory but after reading some here I also put them directly in /gallery/ folder but it still doesn't work... any suggestions!

or maybe it's easier to just make the gallery page in 2 frames with the menu and the logo in the top and a theme in the bottom frame that doesn't have any header at all... not sure how the menu will work then though!

Joachim Müller

First of all: Java is not JavaScript (two entirely different animals). Haven't looked into the JS menu itself, but your paths need fixing. Edit http://lindaofsweden.naesstrom.net/vagabond/gallery/themes/fiplain/template.html, find<script type='text/javascript'>function Go(){return}</script>
<script type='text/javascript' src='menu-single_var.js'></script>

<script type='text/javascript' src='menu131.js'></script>
and replace with<script type="text/javascript">function Go(){return}</script>
<script type="text/javascript" src="/vagabond/gallery/menu-single_var.js"></script>
<script type="text/javascript" src="/vagabond/gallery/menu131.js"></script>
or even<script type="text/javascript">function Go(){return}</script>
<script type="text/javascript" src="menu-single_var.js"></script>
<script type="text/javascript" src="menu131.js"></script>

Naesstrom

Thanks for the real quick reply... I checked the .js files and it doesn't say anything about paths in them anywhere...

I tried to change those parts as you suggested but still didn't work, I even tried the entire URL to them like this:
<body>
<script type="text/javascript">function Go(){return}</script>
<script type="text/javascript" src="http://lindaofsweden.naesstrom.net/vagabond/gallery/menu-single_var.js"></script>
<script type="text/javascript" src="http://lindaofsweden.naesstrom.net/vagabond/gallery/menu131.js"></script>
  {CUSTOM_HEADER}


but it still doesn't work for me... how come the menu is visible when I try and view the template.html file but not when I view the gallery?

Joachim Müller

The menu works fine (the roll over part) on the Coppermine pages (i.e. http://lindaofsweden.naesstrom.net/vagabond/gallery/) - just the link targets are wrong. If the menu doesn't show up for you, force refresh your browser ([Ctrl]+[F5]). It sends you to http://lindaofsweden.naesstrom.net/vagabond/gallery/start.htm when you click on "Asia" > "Thailand". Looking into the JS that you have come up with (http://lindaofsweden.naesstrom.net/vagabond/gallery/menu-single_var.js), this is quite obvious: the Thailand link points toMenu5_1=new Array("Thailand","javascript:top.location.href=\"start.htm\"","",1,20,100,"#ffffff","#cccccc","#000000","#000000","#ffffff","",-1,-1,-1,"","");A file named "start.htm" doesn't exist in the gallery folder.
Another example? Click on "Europe" > "Denmark" and you're being sent to http://www.lindaofsweden.com/vagabond/egypt.html. The corresponding code in your JavaScript code isMenu2_1=new Array("Denmark","http://www.lindaofsweden.com/vagabond/egypt.html","",0,20,100,"#ffffff","#cccccc","#000000","#000000","#ffffff","",-1,-1,-1,"",""); , so it isn't surprising that you're being sent there. Fix you JS code first (it has to contain valid link targets and you should be fine).
This is in no way related to Coppermine, but your faulty JavaScript code. Fix it and it will do what you expect it to do.

Side-note: JavaScript-driven menus are invisible for search engine spiders, so you should definitely come up with an alternative HTML-only navigation embedded into <noscript> tags.

Naesstrom

Ye I know that the links to the different pages isn't working yet... wanted to see if I got the menu to work first... :D

I supose you are using firefox since I can view the menu without any problems there... but not with IE!

Joachim Müller

Yes, I was using FF to test. Using IE the menu indeed doesn't show up. However, this is not related to Coppermine, but your custom JavaScript menu. IE shows a JS error in the status page, complaining that something is undefined. Fix your JS menu and everything should be fine. I can not fix your JS menu, it's beyond the scope of what you can expect on a support board dedicated to Coppermine only.

Naesstrom

Quote from: GauGau on May 22, 2007, 08:09:17 AM
Yes, I was using FF to test. Using IE the menu indeed doesn't show up. However, this is not related to Coppermine, but your custom JavaScript menu. IE shows a JS error in the status page, complaining that something is undefined. Fix your JS menu and everything should be fine. I can not fix your JS menu, it's beyond the scope of what you can expect on a support board dedicated to Coppermine only.

ouch... no need to get so harsh... the thing is if u care to let me explain that the html page on: www.naesstrom.net/lindaofsweden/vagabond/index.html is using the same Javascript as coppermine and it's clearly working on the html page even if I try it in IE so thats why I thought it might be something that was incompatible with coppermine!
I'm not requesting a answer from almighty god, maybe someone else has experienced something like it or might have a clue!

Naesstrom

Solved!

was a problem using swedish chars with the wrong encoding in coppermine...

admin may lock the thread and let it R.I.P.