| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
adding javascript to customer home.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi All,
I'm trying to get two javascript functions to run on the home.tpl I've put the relevant script info between the "literal" tags as below: Code:
And, I've added the onload call in the body tag: Code:
When I view the page at http://www.hearnehardwoods.com/xcart/home.php?shopkey=9779 Everything works except the dropdowns for: Homepage Our Woods Internet Store Customers Contact Us and the rollovers (Dreamweaver) just above the menu and to the right (there are 4 image buttons with text on them) Everything works correctly here: http://www.hearnehardwoods.com/about_us/policies.html I'm running XCart Gold version 4.1.6 Thanks in advance, Debra
__________________
X-Cart v4.1.6 |
|||||||
#2
|
|||||||
|
|||||||
![]() Your closing literal tag is wrong, it should be {/literal} not </literal>
Also, can you please update your forum signature with your X-Cart version? Thank you ![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() thanks for looking at my coding and telling me where the error was. I've fixed that but have a new issue.
The drop down menu is is not working - the sub-menus don't expand over the Search bar, see: http://www.hearnehardwoods.com/xcart/home.php?shopkey=9779 However, the same javascript code does work here: http://www.hearnehardwoods.com/about_us/policies.html Does you have any ideas about what I could do?
__________________
X-Cart v4.1.6 |
|||||||
#4
|
|||||||
|
|||||||
![]() you may want to check the folder structure since you are using "../../" and your xcart and the aboutus are different directories
|
|||||||
#5
|
|||||||
|
|||||||
![]() thanks inebriate,
I double checked my directory path statements and they are valid. To test, I created a test.js javascript file and placed it in the same folder that the drop down menu javascript file (p7popmenu.js) is, loaded the test.js w/in home.tpl (exactly as I did for p7popmenu.js) and called for the function (contained in the test.js file) in head.tpl and it works. Whereas calling for the function contained in the p7popmenu.js in the head.tpl does not work. I also tried put the actual javascript for the drop down menu into the home.tpl but that also did not work. This is the "preview" of my head.tpl, at the top you can see the date modified that is generated by test.js, just below the banner images, you can see my drop down menu (this is what it would look like in a non-css compatible browser) -- don't know if that helps anything, but here;s the link: http://www.hearnehardwoods.com/xcart/test.gif http://www.hearnehardwoods.com/xcart/test.gif
__________________
X-Cart v4.1.6 |
|||||||
#6
|
|||||||
|
|||||||
![]() Found the problem - it has to do with how my "<body onload" coding was done.
The correct code order is: Code:
__________________
X-Cart v4.1.6 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|