php forum
php mysql forum
php mysql smarty
 
Topic Options
#109865 - 01/11/04 06:45 PM My tabbed menu doesn't work...
CTM Offline
Moderator / Da Masta

Registered: 11/23/01
Posts: 2567
http://www.iphq.net/tpmbot/?tab=3

The main menu at the top of the page works fine, but on the Commands tab, clicking one of the command names to bring up more information about it (in the space below the command list) brings up a JS error. The weird thing is, though, that the page actually loads, displays and works fine.

I asked Al, but he wasn't certain what was wrong. Could someone else take a look please? confused

Top
#109866 - 01/11/04 06:55 PM Re: My tabbed menu doesn't work...
Charles Capps Offline
Admin Emeritus

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
Error: document.getElementById(commands[i]) has no properties
Source File: http://www.iphq.net/tpmbot/nav.js
Line: 18

Has no properties -> undefined.

When defining it inside the HTML file, don't use var to declare it. var is sorta like Perl's my - it scopes to the local block. By dropping off the var, you create it globally, which should work better...
_________________________
UBB.classic: Love it or hate it, it was mine.

Top
#109867 - 01/12/04 10:48 AM Re: My tabbed menu doesn't work...
CTM Offline
Moderator / Da Masta

Registered: 11/23/01
Posts: 2567
Thanks Charles. smile

Got rid of the vars from all of the variables I set in the HTML header (I was accessing the other variables through nav.js too, so it's for the best). But unfortunately the JS error is still appearing. frown

I thought it might have something to do with the use of the return false; function (or maybe just return) twice in the same script, but I'm probably wrong...

Top
#109868 - 01/12/04 11:04 AM Re: My tabbed menu doesn't work...
CTM Offline
Moderator / Da Masta

Registered: 11/23/01
Posts: 2567
Uhh... Okay, I understand the problem now. I hadn't defined everything in the commands variable. God, it all makes sense when you enable higher-level script debugging... tipsy

Thanks again, Charles, you put me on the right line to my mistake. The variable was the problem, not the code. smile

Top
#109869 - 01/12/04 07:54 PM Re: My tabbed menu doesn't work...
Charles Capps Offline
Admin Emeritus

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
Aha, looks pretty good now... though you'll want to examine it in 800x600 or so. The tabs at the top are wrapping...

You also might want to look at adding

cursor: pointer;
cursor: hand;

to the CSS rule for the descrptive not-quite-links so that they "feel" clickable.
_________________________
UBB.classic: Love it or hate it, it was mine.

Top
#109870 - 01/13/04 12:22 PM Re: My tabbed menu doesn't work...
CTM Offline
Moderator / Da Masta

Registered: 11/23/01
Posts: 2567
Ah, you're right, it does look disguesting at 800x600. I made the font size on the tabs 10pt now, it looks much better at 1024x768 too. smile

And I thought you could only change cursors using JavaScript in IE... Meh, just goes to show how stupid I am, I guess. wink

Oh, and that reminds me, I thought I'd credited solareclipse in the HTML comment, but I hadn't... It's in there now. wink

Top
#109871 - 01/13/04 01:05 PM Re: My tabbed menu doesn't work...
Charles Capps Offline
Admin Emeritus

Registered: 01/09/00
Posts: 5438
Loc: Lynnwood, WA
Thanks. wink
_________________________
UBB.classic: Love it or hate it, it was mine.

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks