Reply
onclick input background-image change
Old 03-27-2006, 05:40 PM onclick input background-image change
jyoz22's Avatar
Extreme Talker

Posts: 242
Location: Orlando, FL
i'm trying to get an input box's background to change once it's clicked. Is their a way to do this?
__________________
Jyoz
jyoz22 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 03-27-2006, 07:35 PM Re: onclick input background-image change
vangogh's Avatar
Post Impressionist

Posts: 8,831
Name: Steven Bradley
Location: Boulder, Colorado
It's going to be more a javascript thing than a css thing. You should have the onclick event go to a javscript function that finds the correct input and then changes the background color.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
| Small Business Forum
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 03-27-2006, 08:27 PM Re: onclick input background-image change
jyoz22's Avatar
Extreme Talker

Posts: 242
Location: Orlando, FL
whoops, i meant background image i though i said that but thanks i'm goint to start searching.
__________________
Jyoz
jyoz22 is offline
Reply With Quote
View Public Profile
 
Old 03-28-2006, 02:31 PM Re: onclick input background-image change
collyer_1's Avatar
Extreme Talker

Posts: 169
Location: Southern Alberta, Canada
I don't know if that could be done to an input item.

If you wanted to do it to a link you could use:

Code:
a { background-image: url(original_background.jpg); }
a:hover { background-image: url(mouseover_background.jpg); }
a:active { background-image: url(click_background.jpg); }
I havn't attempted it but why not try...

Code:
input { background-image: url(original_background.jpg); }
input:hover { background-image: url(mouseover_background.jpg); }
input:active { background-image: url(click_background.jpg); }
collyer_1 is offline
Reply With Quote
View Public Profile Visit collyer_1's homepage!
 
Old 03-28-2006, 02:46 PM Re: onclick input background-image change
jyoz22's Avatar
Extreme Talker

Posts: 242
Location: Orlando, FL
well i already found all i needed at: http://msdn.microsoft.com/library/de...roundimage.asp

thanks anyways!
__________________
Jyoz
jyoz22 is offline
Reply With Quote
View Public Profile
 
Old 03-28-2006, 05:59 PM Re: onclick input background-image change
vangogh's Avatar
Post Impressionist

Posts: 8,831
Name: Steven Bradley
Location: Boulder, Colorado
Yep javascript.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
| Small Business Forum
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to onclick input background-image change
 

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12730 seconds with 12 queries