View Full Version : Top-Level and Sub Section Navigation (Javascripts)
bkadvpc
29-Dec-2003, 06:22 PM
:confused:
I'm using the Layout14 from the Clean Layout Themes (w/ Section List already exists -NETQUOTEVAR:TOPLEVELSECTIONSTOP-). And, I'm trying to change the Section list either to a jump menu with a drop-down menu for Top-Level and Sub Sections or a list. With following the steps from the Advanced Users Guide (pg 27 through 33), I'm getting multiple Java runtime errors on previewing the web site locally. I removed the NETQUOTEVAR:TOPLEVELSECTIONSTOP, and tried each single section list option from Adv.Users Guide. None of them seems working, or I'm leaving out something.
My purpose is having Top-Level and Sub Section List on the left to ease the navigation. I've more than three-level sub sections on some of them. So it creates a hasssle to reach the products.
Or is there another way besides NorTree?
Any suggestions?
B.Kaya
Thanks
PS: Web site has not been launched to Internet yet.
TraceyG
08-Jan-2004, 10:04 AM
Hi,
I've tried the code that you were using for a Drop-Down List with Top Level Sections and Sub-Sections by copying and pasting the code into my Primary template and it worked fine.
Can you attach your Act_Primary.html file (change to extention to .txt so you can attach it or paste the contents into your post) and I will take a look at what you have done.
bkadvpc
08-Jan-2004, 07:11 PM
Here is what I wanna do; I'm having our Top-Level Sections on the left, while having a drop-down jump menu for Top & Sub-level Sections on the right. I tried both drop-down and list for top and sub-level sections, they gave errors. I also tried Yahoo style, it gave me an error.
The attached file is Drop down for top-sub section.
The JS errors I'm getting are:
Error: Expected Hexadecimal digit
Error:"section_tree" is undefined
bk
:confused:
bkadvpc
08-Jan-2004, 08:37 PM
PS: With Netscape it seems like it's ok.
NormanRouxel
08-Jan-2004, 11:52 PM
I'll bet you've got some unusual characters in one of your section names.
Norman
TraceyG
09-Jan-2004, 07:59 AM
Hi,
I've tested your Act_Primary.html template in one of my sites and it works ok without any javascript errors so there is nothing wrong with the coding. Can you check Norman's suggestion.
bkadvpc
09-Jan-2004, 05:28 PM
:)
Norm, you were right. I had ignored naming conventions and used some characters on some of the section names. But, though I changed those, I still got the errors. When searched the net I found what it's.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jserrexpectedhexadecimaldigit.asp
http://www.webmasterworld.com/forum91/383.htm
"\u" is escape code for a hex digit
"u\" also gives errors
So I changed the image names:
WAS
section_tree[5].pChild[4].pChild[1].sImage = "images1\subsecCPU\xeon_1_512.gif";
NOW
section_tree[5].pChild[4].pChild[1].sImage = "images1\subsecCPU\ixeon_1_512.gif";
WAS
section_tree[20].pChild[1].sImage = "images1\subsecimg\ups_netsvr.gif";
NOW
section_tree[20].pChild[1].sImage = "images1\subsecimg\apcups_netsvr.gif";
Thanks guys. Tracy, Norm I appreciate your help.
Regards
BK
NormanRouxel
09-Jan-2004, 06:00 PM
I think Actinic already know about this. This is a Previewing problem only. Also it probably woudn't affect a live site as all the images are in the same folder and there would be no \ in any path names.
In fact a \ should really always be represented by \\ in a JavaScript string (because future versions of JavaScript may define new \ codes) so Actinic would be much better fixing this by replacing all \ with \\ when generating these JavaScript arrays for Previewing.
Norman
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.