Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Adding DHTML navigation to store pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-13-2006, 06:42 PM
  SailorChick_33588's Avatar 
SailorChick_33588 SailorChick_33588 is offline
 

Newbie
  
Join Date: Nov 2005
Location: California
Posts: 8
 

Default Adding DHTML navigation to store pages

Hi There,

I'm stuck and wondering if anyone has already attempted to do what I'm attempting to do. So....

I am adding some DHTML navigation to my x-cart store. Right now it works fine on the index.html page within my store directory, but when I added the code that calls the external javascript file (which powers the nav bar) to home.tpl, the functionality works, but I lose the formatting.

You can see what I mean here:

http://69.233.191.177/RPstore/
index.html page within the store directory, where the DHTML works fine

http://69.233.191.177/RPstore/home.php?cat=1
store page where the DHTML functionality is working, but formatting is not.

(please note this is not a live store, and is currently under construction, so pardon the mess)

The formatting is part of the javascript, there isn't a style sheet for the navigation. Has anyone successfully integrated a DHTML nav bar into the home.tpl template before?

tia...


[/url]
__________________
x-cart gold (unix)
Version 4.0.16
Reply With Quote
  #2  
Old 02-14-2006, 03:07 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Tough to tell without seeing how the script is written.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-14-2006, 10:20 AM
  SailorChick_33588's Avatar 
SailorChick_33588 SailorChick_33588 is offline
 

Newbie
  
Join Date: Nov 2005
Location: California
Posts: 8
 

Default

Here is the snipet that is in the home.tpl file

Code:
<div id=DMBRI style="position:absolute; background-color: #990000;" > [img]http://69.233.191.177/menus/images/dmb_i.gif[/img] [img]http://69.233.191.177/menus/dmb_m.gif[/img] </div> <script language="JavaScript" type="text/javascript"> {literal} var rimPath=null;var rjsPath=null;var rPath2Root=null;function InitRelCode(){var iImg;var jImg;var tObj;if(!document.layers){iImg=document.images['DMBImgFiles'];jImg=document.images['DMBJSCode'];tObj=jImg;}else{tObj=document.layers['DMBRI'];if(tObj){iImg=tObj.document.images['DMBImgFiles'];jImg=tObj.document.images['DMBJSCode'];}}if(!tObj){window.setTimeout("InitRelCode()",700);return false;}rimPath=_gp(iImg.src);rjsPath=_gp(jImg.src);rPath2Root=rjsPath+"../";return true;}function _purl(u){return xrep(xrep(u,"%%REP%%",rPath2Root),"\\","/");}function _fip(img){if(img.src.indexOf("%%REL%%")!=-1) img.src=rimPath+img.src.split("%%REL%%")[1];return img.src;}function _gp(p){return p.substr(0,p.lastIndexOf("/")+1);}function xrep(s,f,n){if(s) s=s.split(f).join(n);return s;}InitRelCode(); {/literal} </script> <script language="JavaScript" type="text/javascript"> {literal} function LoadMenus() {if(!rjsPath){window.setTimeout("LoadMenus()", 10);return false;}var navVer = navigator.appVersion; if(navVer.substr(0,3) >= 4) if((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)==4)) { document.write('<' + 'script language="JavaScript" type="text/javascript" src="' + rjsPath + 'nsmenu.js"><\/script\>'); } else { document.write('<' + 'script language="JavaScript" type="text/javascript" src="' + rjsPath + 'iemenu.js"><\/script\>'); }return true;}LoadMenus(); {/literal} </script>

I should mention that I used a nifty tool called DHTML Builder to construct the nav bar.

Thanks...
__________________
x-cart gold (unix)
Version 4.0.16
Reply With Quote
  #4  
Old 02-14-2006, 10:32 AM
  SailorChick_33588's Avatar 
SailorChick_33588 SailorChick_33588 is offline
 

Newbie
  
Join Date: Nov 2005
Location: California
Posts: 8
 

Default

This is the relevant part of the javascript that handles the formatting:

Code:
"<div id=dmbTBBack1 style=\"position:absolute;overflow:hidden;z-index:998617 20px;border:0px solid ;\"></div><div id=dmbTB1 style=\"position:absolute;z-index:999617 20px;\"><div nowrap id=N100100102 20px 2 11;status=\'HOME\'http://www.reactorpanel.com13592 140920HOME* id=O100100102 20px 2 11HOME\'http://www.reactorpanel.com13592 140920* id=N10020103102 20px 2 11;status=\'RP STORE\'http://www.reactorpanel.com/shop/13592 140920RP STORE* id=O10020103102 20px 2 11RP STORE\'http://www.reactorpanel.com/shop/13592 140920* id=N10030206102 20px 2 11grp03\',31THE RP SYSTEM\'http://www.reactorpanel.com13592 140920THE RP SYSTEM* id=O10030206102 20px 2 11;grp03\',31THE RP SYSTEM\'http://www.reactorpanel.com13592 140920* id=N10040309102 20px 2 11grp04\',41SADDLES\'http://www.reactorpanel.com13592 140920SADDLES* id=O10040309102 20px 2 11;grp04\',41SADDLES\'http://www.reactorpanel.com13592 140920* id=N10050412102 20px 2 11grp05\',51SADDLE FIT\'http://www.reactorpanel.com13592 140920SADDLE FIT* id=O10050412102 20px 2 11;grp05\',51SADDLE FIT\'http://www.reactorpanel.com13592 140920* id=N10060515102 20px 2 11grp06\',61ABOUT US\'http://www.reactorpanel.com13592 140920ABOUT US* id=O10060515102 20px 2 11;grp06\',61ABOUT US\'http://www.reactorpanel.com13592 1409200</div>"),'%'+'%REL%%',rimPath));close();}if(IE) with(document){open();write(f39(f38("<div id=\"grp01006 5;grp01frmt006 5px 1  1! 1# 1px solid/grp02006 5;grp02frmt006 5px 1  1! 1# 1px solid/grp0300133 215;grp03frmt00133 215px 1  1! 1# 1$22127 20px 2 11%0(RP Benefits\'35117 1401170RP Benefits*22127 20px 2 11+0,http://www.reactorpanel.com135117 1401170*232127 20px 2 11%1(Saddle Evolution\'35117 1401170Saddle Evolution*232127 20px 2 11+1,http://www.reactorpanel.com135117 1401170*442127 20px 2 11%2(Engineering\'35117 1401170Engineering*442127 20px 2 11+2,http://www.reactorpanel.com135117 1401170*652127 20px 2 11%3(Dynamic Fit\'35117 1401170Dynamic Fit*652127 20px 2 11+3,http://www.reactorpanel.com135117 1401170*862127 20px 2 11%4(System Components\'35117 1401170System Components*862127 20px 2 11+4,http://www.reactorpanel.com135117 1401170*1072127 20px 2 11%5(RP FAQ\'35117 1401170RP FAQ*1072127 20px 2 11+5,http://www.reactorpanel.com135117 1401170*1282127 20px 2 11%6(Rider Comfort\'35117 1401170Rider Comfort*1282127 20px 2 11+6,http://www.reactorpanel.com135117 1401170*1492127 20px 2 11%7(Testimonials\'35117 1401170Testimonials*1492127 20px 2 11+7,http://www.reactorpanel.com135117 1401170*1702127 20px 2 11%8(Fitting the RP\'35117 1401170Fitting the RP*1702127 20px 2 11+8,http://www.reactorpanel.com135117 1401170*1912127 20px 2 11%9&grp07.6RP ACCESSORIES б╩\'35117 1401170RP ACCESSORIES б╩*1912127 20px 2 11+9,http://www.reactorpanel.com135117 1401170-grp0400147 131;grp04frmt00147 131px 1  1! 1# 1$22141 20px 2 11%10&grp08.6Which RP is for me? б╩\'35131 1401310Which RP is for me? б╩*22141 20px 2 11+10,http://www.reactorpanel.com135131 1401310*232141 20px 2 11%11(Test Ride Program\'35131 1401310Test Ride Program*232141 20px 2 11+11,http://www.reactorpanel.com135131 1401310*442141 20px 2 11%12(Customize Your RP\'35131 1401310Customize Your RP*442141 20px 2 11+12,http://www.reactorpanel.com135131 1401310*652141 20px 2 11%13(Pricing & Policies\'35131 1401310Pricing & Policies*652141 20px 2 11+13,http://www.reactorpanel.com135131 1401310*862141 20px 2 11%14(Testimonials\'35131 1401310Testimonials*862141 20px 2 11+14,http://www.reactorpanel.com135131 1401310*1072141 20px 2 11%15(Classifieds & Clearance\'35131 1401310Classifieds & Clearance*1072141 20px 2 11+15,http://www.reactorpanel.com135131 1401310-grp0500204 110;grp05frmt00204 110px 1  1! 1# 1$22198 20px 2 11%16(Does Your Saddle Fit?\'35188 1401880Does Your Saddle Fit?*22198 20px 2 11+16,http://www.reactorpanel.com135188 1401880*232198 20px 2 11%17(Find a Fitting Agent\'35188 1401880Find a Fitting Agent*232198 20px 2 11+17,http://www.reactorpanel.com135188 1401880*442198 20px 2 11%18(Educational Saddle Fitting Seminar\'35188 1401880Educational Saddle Fitting Seminar*442198 20px 2 11+18,http://www.reactorpanel.com135188 1401880*652198 20px 2 11%19(Fitting Clinics\'35188 1401880Fitting Clinics*652198 20px 2 11+19,http://www.reactorpanel.com135188 1401880*862198 20px 2 11%20(Fitting Challenges\'35188 1401880Fitting Challenges*862198 20px 2 11+20,http://www.reactorpanel.com135188 1401880-grp0600110 173;grp06frmt00110 173px 1  1! 1# 1$22104 20px 2 11%21(Calendar\'3594 140940Calendar*22104 20px 2 11+21,http://www.reactorpanel.com13594 140940*232104 20px 2 11%22(What\\'s New?\'3594 140940What\'s New?*232104 20px 2 11+22,http://www.reactorpanel.com13594 140940*442104 20px 2 11%23(Company History\'3594 140940Company History*442104 20px 2 11+23,http://www.reactorpanel.com13594 140940*652104 20px 2 11%24(Fitting Agents\'3594 140940Fitting Agents*652104 20px 2 11+24,http://www.reactorpanel.com13594 140940*862104 20px 2 11%25(Staff\'3594 140940Staff*862104 20px 2 11+25,http://www.reactorpanel.com13594 140940*1072104 20px 2 11%26(Contact Us\'3594 140940Contact Us*1072104 20px 2 11+26,http://www.reactorpanel.com13594 140940*1282104 20px 2 11%27(Testimonials\'3594 140940Testimonials*1282104 20px 2 11+27,http://www.reactorpanel.com13594 140940*1492104 20px 2 11%28(Links\'3594 140940Links*1492104 20px 2 11+28,http://www.reactorpanel.com13594 140940-grp0700120 26;grp07frmt00120 26px 1  1! 1# 1$22114 20px 2 11%29(Outfit the RP Horse\'35104 1401040Outfit the RP Horse*22114 20px 2 11+29,http://www.reactorpanel.com135104 1401040-grp0800131 257;grp08frmt00131 257px 1  1! 1# 1$22125 20px 2 11%30(The Alexsandra\'35115 1401150The Alexsandra*22125 20px 2 11+30,http://www.reactorpanel.com135115 1401150*232125 20px 2 11%31(The AvantGarde\'35115 1401150The AvantGarde*232125 20px 2 11+31,http://www.reactorpanel.com135115 1401150*442125 20px 2 11%32(The Baker\'35115 1401150The Baker*442125 20px 2 11+32,http://www.reactorpanel.com135115 1401150*652125 20px 2 11%33(The Elegance\'35115 1401150The Elegance*652125 20px 2 11+33,http://www.reactorpanel.com135115 1401150*862125 20px 2 11%34(The LaCrosse\'35115 1401150The LaCrosse*862125 20px 2 11+34,http://www.reactorpanel.com135115 1401150*1072125 20px 2 11%35(The Esprit H/J\'35115 1401150The Esprit H/J*1072125 20px 2 11+35,http://www.reactorpanel.com135115 1401150*1282125 20px 2 11%36(The Esprit Foxhunter\'35115 1401150The Esprit Foxhunter*1282125 20px 2 11+36,http://www.reactorpanel.com135115 1401150*1492125 20px 2 11%37(The VSD Traditional\'35115 1401150The VSD Traditional*1492125 20px 2 11+37,http://www.reactorpanel.com135115 1401150*1702125 20px 2 11%38(The VSD Summit\'35115 1401150The VSD Summit*1702125 20px 2 11+38,http://www.reactorpanel.com135115 1401150*1912125 20px 2 11%39(The VSD Baker Trail\'35115 1401150The VSD Baker Trail*1912125 20px 2 11+39,http://www.reactorpanel.com135115 1401150*2122125 20px 2 11%40(the Cross-Functional\'35115 1401150the Cross-Functional*2122125 20px 2 11+40,http://www.reactorpanel.com135115 1401150*2332125 20px 2 11%41(The Endurance\'35115 1401150The Endurance*2332125 20px 2 11+41,http://www.reactorpanel.com135115 14011500</div></div>"),'%'+'%REL%%',rimPath));close();}f38('');f9();function f38(c){x="#FFFFFF";c=f39(c,"",x);x="#003366";c=f39(c,"",x);x=";visibility:hidden;width:";c=f39(c,"",x);x=" style=\"position:absolute;white-space:nowrap;top:";c=f39(c,"",x);x="px;\"><div style=\"position:absolute;top:";c=f39(c,"",x);x="px;left:";c=f39(c,"",x);x="px;width:";c=f39(c,"",x);x="px;height:";c=f39(c," ",x);x=";font-family:";c=f39(c," ",x);x=";font-size:";c=f39(c," ",x);x="px;font-weight:bold;font-style:normal;text-decoration:none;color:";c=f39(c,"",x);x=";background-color:";c=f39(c,"",x);x=";\"><span style=\"position:absolute;top:";c=f39(c,"",x);x="px;\" align=left>";c=f39(c,"",x);x="px;\" align=center>";c=f39(c,"",x);x=";\" OnMouseOver=\"f12(0,this);cFrame.ShowMenu(\'";c=f39(c,"",x);x=";\" OnMouseOver=\"f12(0,this)";c=f39(c,"",x);x=",0,false,\'\',-";c=f39(c,"",x);x=");status=\'";c=f39(c,"",x);x=";\" OnClick=\"cFrame.execURL(\'";c=f39(c,"",x);x=" style=\"position:absolute;white-space:nowrap;visibility:hidden;top:";c=f39(c,"",x);x="\" OnMouseOver=\"cFrame.ShowMenu(\'";c=f39(c,"",x);x=";cursor:pointer";c=f39(c,"",x);x=";\" OnMouseOver=\"status=\'";c=f39(c,"",x);x="\" style=\"position:absolute;top:";c=f39(c,"",x);x="px;visibility:hidden";c=f39(c,"",x);x="\"><div id=\"";c=f39(c,"",x);x=";border-left:";c=f39(c,"",x);x="px solid;border-right:";c=f39(c," ",x);x="px solid;border-top:";c=f39(c,"!",x);x="px solid;border-bottom:";c=f39(c,"#",x);x="px solid;\"><div nowrap";c=f39(c,"$",x);x=";\" id=N";c=f39(c,"%",x);x=" OnMouseOver=\"cFrame.f27(0,this);cFrame.ShowMenu(\'";c=f39(c,"&",x);x=" OnMouseOver=\"cFrame.f27(0,this";c=f39(c,"(",x);x="</div></span></div><div nowrap";c=f39(c,"*",x);x=";\" id=O";c=f39(c,"+",x);x=" OnClick=\"cFrame.execURL(\'";c=f39(c,",",x);x="</div></span></div></div></div><div id=\"";c=f39(c,"-",x);x="\',0,0,true,\'\',";c=f39(c,".",x);x=";\"></div></div><div id=\"";c=f39(c,"/",x);x="</div></span></div>";c=f39(c,"0",x);x="\',\'_self\')";c=f39(c,"1",x);x="Arial";c=f39(c,"2",x);return c;}

It's a big ugly file, don't know if it will be much help or not...
__________________
x-cart gold (unix)
Version 4.0.16
Reply With Quote
  #5  
Old 02-14-2006, 10:47 AM
  SailorChick_33588's Avatar 
SailorChick_33588 SailorChick_33588 is offline
 

Newbie
  
Join Date: Nov 2005
Location: California
Posts: 8
 

Default

Ha! Wouldn't you know it, I figured it out! The problem was in my skin1.css file. I just needed to change my div style and it now works beautifully!

Thanks!

SailorChick
__________________
x-cart gold (unix)
Version 4.0.16
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:50 PM.

   

 
X-Cart forums © 2001-2020