Hi, Unregistered. | Today's Posts

T-Shirt Forums
User Name
Password

Need to Register?

Forgot Your Password?


Site Navigation




+   T-Shirt Forums > T-Shirt Selling > Ecommerce Site Design
Discuss website design for ecommerce sites, useability, navigation and other development considerations

Rollover javascript for changing t shirt colors



 
Share This Thread Thread Tools Search this Thread
Old October 5th, 2009 Oct 5, 2009 7:20:45 PM -   #1 (permalink)
Forum Member
T-Shirt Apprentice

dgu56's Avatar
 
Member Since: Jun 2009
Posts: 7
Thanks: 2
Thanked 1 Time in 1 Post


Default Rollover javascript for changing t shirt colors

I have been reading the forums for months now, and I have received a ton of great information. It's time to give back a little, I think.

I've noticed many people are having trouble (like we did), with using a simple javascript that would make t-shirts change colors when you roll the mouse over text.

The javascripts we tried were either two part, where we had to put something in the head section, along with the body, or they wouldn't xhtml validate (which our website requires). Anything we used had to be "inline," in that it had to be simple, cut 'n pastable, reside in the "body," and easily configurable.

We simply are not code writers; all we want to do is design and sell t-shirts. But we finally put together a javascript anybody can use as a starter system, and then branch out from there as he gets more comfortable with javascript.

I wrote a blog post about it, with all the links, including a link to download the exact rollover javascript we are using. Just download the javascript and then look at our t-shirt site to see how it all works. You should be able to easily customize it for your site by replacing our images with yours, and using your own color names in place of ours.

The blog article is at greenmanblog.com/archives/157-Rollover-Javascript-for-Changing-T-Shirt-Colors.html

Hope this helps anyone just starting out with a website like we are. And, if anyone has a better rollover javascript, please let us know, will you? The color changing t-shirts are pretty much a "must have" for any t-shirt site.

Dave
Green Man T Shirts

Last edited by Rodney; October 12th, 2009 at 12:57 PM. Reason: delinked URL
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 7th, 2009 Oct 7, 2009 5:32:44 PM -   #2 (permalink)
Forum Member
T-Shirt Apprentice
Thread Starter

dgu56's Avatar
 
Member Since: Jun 2009
Posts: 7
Thanks: 2
Thanked 1 Time in 1 Post


Default Re: Rollover javascript for changing t shirt colors

Hey, I just wanted to clarify something.

In the code you will see: <A HREF="url" onMouseover="change1('pic........ and so on.

You probably don't need the HREF="url", so just remove it. The difference is that the HREF="url" makes the rollover text clickable (it's already rollover), and it gets a little confusing. It's cleaner just to have rollover text and not try to make it clickable to a link also. After you remove all the HREF="url"s you will notice that the rollover text no longer is underlined and is not a link to anything anymore, although it still works when the mouse goes over it.

I hope that's clear. Just make it:

<A on mouseover="change1('pic1', .........

I believe there are 6 of those HREF="url"s in the code I provided. Remove them all.

Also, the parts: <p style="margin-left:30px;"> is only just a way to indent. Make it 40px and it indents more; make it 20px and it indents less. Remove the whole thing if you don't need an indent.

Any questions, just post it and I'll try to muddle through it.

Last edited by Rodney; October 12th, 2009 at 12:56 PM. Reason: removed link to member website as per forum rules - feel free to add it to your signature
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
The Following User Says Thank You to dgu56 For This Useful Post:
out da box (October 7th, 2009)
Old October 15th, 2009 Oct 15, 2009 2:22:57 PM -   #3 (permalink)
T-Shirt Lover
T-Shirt Fan

Clobbersaurus's Avatar
 
You can call me: Joseph
Member Since: Jul 2009
Posts: 23
Thanks: 19
Thanked 3 Times in 2 Posts


Default Re: Rollover javascript for changing t shirt colors

Thanks for the code, it looks pretty clean on your site. I guess my decision now is do i want a clean looking interface for the client or continue to use individual pages for each color to try and rank a broad range of keywords.
__________________
Fishing Shirts
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 15th, 2009 Oct 15, 2009 2:56:42 PM -   #4 (permalink)
Forum Member
T-Shirt Apprentice
Thread Starter

dgu56's Avatar
 
Member Since: Jun 2009
Posts: 7
Thanks: 2
Thanked 1 Time in 1 Post


Default Re: Rollover javascript for changing t shirt colors

I know what you mean. We've been playing with all the SEO tricks too, but now we're just trying to make a good website for the customers.

BTW, your fishing t-shirt site looks awesome. Somebody definitely knows what they are doing.

Dave
Organic t shirts -Green Man T Shirts

Last edited by dgu56; October 15th, 2009 at 03:02 PM. Reason: addition
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!


This is a discussion about Rollover javascript for changing t shirt colors that was posted in the Ecommerce Site Design section of the forums.

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Colors or inverting? Photoshop Leeboy Graphics and Design Help 17 May 27th, 2009 04:33 AM
Colors Changing jirwin33 Direct to Garment (DTG) Inkjet Printing 7 April 4th, 2008 11:17 AM
Looking for advice on changing colors KESTDAWG Screen Printing 3 April 3rd, 2008 03:58 PM
wrong colors after changing printhead corakes Direct to Garment (DTG) Inkjet Printing 3 November 17th, 2007 09:35 PM
changing ink colors HIshirts Screen Printing 2 May 18th, 2007 02:39 AM


All times are GMT -8. The time now is 09:59 PM.


Copyright 2004-2009 T-ShirtForums.com. All rights reserved.