marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Missing Javascript on Section Pages

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Missing Javascript on Section Pages »
Welcome, Guest. Please Login or Register.
12/15/17 at 12:16:49
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Missing Javascript on Section Pages
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Missing Javascript on Section Pages  (Read 471 times)
hexxamillion
Silver Dragon
***

Posts: 31



Live Free! It's all about open source!
   

WWW
Missing Javascript on Section Pages
« on: 02/19/11 at 17:30:41 »
Reply with quote Modify message

I created custom navigation using jquery and it displays correctly on my storefront. When you access any of my sections the javascript appears to be missing so the navigation is broken.  See the example on my test site- http://cptest.hexxwear.com/cpshop.cgi Click on a section.

I reference the javascript in the head of my cptemplate file. What other file do I need to edit for the section pages to pick up the javascript? I tried adding the script paths in cpadmin under the "other display options" section. That did not work.

Any suggestions? Do I need to edit the cpdata.lib or cppage.lib
Logged

My Shop: http://hexxwear.com
My Homepage: http://hexxworld.com
hexxamillion
Silver Dragon
***

Posts: 31



Live Free! It's all about open source!
   

WWW
Re: Missing Javascript on Section Pages
« Reply #1 on: 02/19/11 at 21:33:36 »
Reply with quote Modify message

So after some hair pulling and forum digging I actually found the answer from Marty's FAQ on installation. I'm still a little puzzled because its something so simple. It had to do with how I referenced the .js files. I assumed it should have worked because I used the full URL address. I had to adjust it using /<js dir>/<js file> instead of http://url_to_my_js/file

------------
Marty's words:

"Reference all links and images with full or absolute links. NO RELATIVE LINKS. Because the page will be perceived by the browser as coming from the same location as the script, relative links (links that are based on the URL of the current page) are a no-no. For example:

   * <a href="map.html">map</a> - BAD
   * <a href="../../map.html">map</a> - BAD
   * <a href="/aboutus/map.html">map</a> - GOOD
   * <a href="http://www.us.com/aboutus/map.html">map</a> - GOOD

This goes for images, background tiles, page links, image map links, javascript URLs -- everything that includes a web address."
« Last Edit: 02/19/11 at 21:34:33 by hexxamillion » Logged

My Shop: http://hexxwear.com
My Homepage: http://hexxworld.com
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.