|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
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?
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
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.
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
Thanks Charles. 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. 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...
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
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... Thanks again, Charles, you put me on the right line to my mistake. The variable was the problem, not the code.
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
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.
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
Joined: Nov 2001
Posts: 1,704 |
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. And I thought you could only change cursors using JavaScript in IE... Meh, just goes to show how stupid I am, I guess. Oh, and that reminds me, I thought I'd credited solareclipse in the HTML comment, but I hadn't... It's in there now.
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Thanks.
UBB.classic: Love it or hate it, it was mine.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|