| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Javascript Change Image Issues | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Javascript Change Image Issues
Hi - I'm wondering if someone can help me with this. It's driving me nuts! My original programmer and designer put together a great site wrapper where whenever you passed over the category names, it would show a pic above it.
You can see it in action here: http://www.girlsnightoutdesigns.com/jewelry_collection.php Just pass over The Jewelry Collection, Cigar Box Purses, etc ... and you will see what I'm talking about. However, I can't get this to work within X-Cart. (This page is static and outside of my X-Cart generated pages.) I've tried many different ways to modify head.tpl and customer/home.tpl, pulling the javascript from the original page, etc., and haven't been able to get it working. I'm self taught at all of this and I'm guessing Javascript is going to be my next lesson! I've learned so much just by searching these forums, but haven't been able to find the answer to this. I'd be happy to provide any other info needed. If anyone has any ideas, I'd appreciate it! Thanks so much!
__________________
Holly x-cart v. 4.4.2 |
|||||||
#2
|
|||||||
|
|||||||
Re: Javascript Change Image Issues
did you put the {litera}{/literal} tags around your javascript in your smarty template?
|
|||||||
#3
|
|||||||
|
|||||||
Re: Javascript Change Image Issues
Hi - Thanks for the reply. Yes, I had put the {literal} tags in. It still didn't help. No image change. Any other suggestions? I'm all ears!!
__________________
Holly x-cart v. 4.4.2 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Javascript Change Image Issues
What happens when you add the changeImages() function within the head? Any errors?
__________________
Doms kube v4.1.9 |
|||||||||
#5
|
|||||||
|
|||||||
Re: Javascript Change Image Issues
I've tried putting that part in the <head> of customer/home.tpl. Is that what you mean? I tried that and it just doesn't do anything. No errors, but no image change either.
Or in the actual head.tpl? I tried that, too. Same thing. No error, but no image change.
__________________
Holly x-cart v. 4.4.2 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Javascript Change Image Issues
Try adding this to the HEAD...
Code:
__________________
Doms kube v4.1.9 |
|||||||||
#7
|
|||||||
|
|||||||
Re: Javascript Change Image Issues
Thanks for getting back so quick. I just tried that and it didn't do anything either. (Tried putting it once in head.tpl and the <head> tag of the customer/home.tpl.) In both cases, it didn't seem to do anything. No change.
Man, this is frustrating! I wonder why it wouldn't be doing anything at all. Maybe I am not putting the code in the right place? Would it helped if I posted the code here? Which would be helpful ... the head.tpl or the customer/home.tpl?
__________________
Holly x-cart v. 4.4.2 |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Javascript Change Image Issues
It should work for your home page. The problem is that I can see that there are 2 differents sets of code running around for the same function...
This is the mouseover on your home page... Code:
Code:
Notice that they have different image locations (one is img/ and the other is girlsnight/images/), this should also be reflected within the script in the HEAD part as well. Did you paste the code in between the head tags inside skin1/customer/home.tpl?
__________________
Doms kube v4.1.9 |
|||||||||
#9
|
|||||||
|
|||||||
Re: Javascript Change Image Issues
Ah, that's what you get when different people work on your pages! I am still going through and cleaning up. (The images are actually in both directories, too.)
So, I put the code you gave me in the HEAD of the customer/home.tpl. I went back to the head.tpl and made sure that the actual "onmouseover" chunk of code had the right pic directory as well. Still no change. (Wait, should all of that be in the home.tpl? Should I move that related code in the head.tpl to the body section of home.tpl? I vaguely recall trying that earlier, but didn't think that worked either.) I appreciate all your help and any other suggestions you may have!!
__________________
Holly x-cart v. 4.4.2 |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Javascript Change Image Issues
After adding the code, are you clearing xcart's own cache, then refreshing the page and viewing the source from the browser (View > Source) to see if it is there?
__________________
Doms kube v4.1.9 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|