iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old October 30th, 2006, 10:02 AM   #1
Highly Reputable Member
 
masonbarge's Avatar
 

Join Date: Jan 2006
Location: Atlanta GA
Posts: 640
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 masonbarge will become famous soon enough
MouseOver for Form Submit Button image?

Is there any way to use an image for a submit button in a html form and have a js mouseover effect, without using js as the submit handler?

I've tried everything I can think of. I even did a page link to a hidden input (the rollover worked fine but it wouldn't submit). Apparently MouseOver is not native to the <input> tag.
masonbarge is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 30th, 2006, 10:52 AM   #2
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: MouseOver for Form Submit Button image?

Code:
<input class='button' id='subButton' name='subForm' type='submit' value='submit' title='Activating this button validates your input and if ok, submits the form for processing. An invalid form is returned with your content in tact and error messages displayed.' tabindex='11' />
Straight off one of my pages.

Style the element in the usual way and use :hover to produce your rollover effect.

Note the bit I've highlighted.
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 30th, 2006, 11:44 AM   #3
Highly Reputable Member
 
masonbarge's Avatar
 

Join Date: Jan 2006
Location: Atlanta GA
Posts: 640
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 masonbarge will become famous soon enough
Re: MouseOver for Form Submit Button image?

Thanks Geoff, but I'm trying to get an image rollover. It's for a nice small insta-load page and I thought I'd have some fun with the button.

I could put the whole list in Flash except I'm even more deficient in Flash than my other |\|o06 $Killz.
masonbarge is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 30th, 2006, 12:13 PM   #4
Most Reputable Member
 

Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,307
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 ukgeoff has a spectacular aura about ukgeoff has a spectacular aura about
Re: MouseOver for Form Submit Button image?

Yes, I understand that.

Just create styles for your buttons that include e.g., background-image: normal.gif, and in your :hover style, background-image: rollover.gif.
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old October 31st, 2006, 07:58 AM   #5
Highly Reputable Member
 
masonbarge's Avatar
 

Join Date: Jan 2006
Location: Atlanta GA
Posts: 640
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 masonbarge will become famous soon enough
Re: MouseOver for Form Submit Button image?

OK, I see what you mean now. Actually finally figured it out, LOL, I wish I'd checked back here and saved some time.

Thanks for the help.
masonbarge is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
forms , mouseover , rollover , submit


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image button triggers <form> action rcflyer2005 JavaScript 1 April 18th, 2008 03:21 AM
[SOLVED] large radio button form submit chriscant JavaScript 7 October 25th, 2007 05:03 AM
Does a submit button have to be in the form itself Sylvester HTML, XHTML and CSS 1 April 17th, 2007 08:14 AM
Form Submit button Help!!! Aaron1988 HTML, XHTML and CSS 2 November 25th, 2006 09:51 AM
Two form actions on pressing submit button? AndyP HTML, XHTML and CSS 7 July 25th, 2005 12:25 PM


Search Engine Optimization by vBSEO 3.2.0 RC8