Rollover / Hover / Mouseover Buy Buttons Help Needed :s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey guys, I need to create a rollover button using Dreamweaver CS4 using either HTMl or CSS (dont want Javascript as it can be disabled unless someone suggests valid reason(s) otherwise)
I have researched this on the net and on the PayPal forums but to no avail, i have this code so far:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="../_images/BUY-BUTTON.png" border="0" onMouseOver="this.src='../_images/BUY-BUTTON—-Blue.png'" onMouseOut="this.src='../_images/BUY-BUTTON.png'" alt="" name="submit"/>
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RG74BCA646B78">
<img alt="" border="0" src="../_images/BUY-BUTTON.png" width="1" height="1">
</form>
This sort of works but on mouse over the image doesn't appear it just shows that default error / empty image rather than my BUY-BUTTON—-Blue.png image. From all the resaerch the above code works for some people but not me, typical! Anyway if no one can suggest whats wrong perhaps I should use CSS although ive looked for this code too and cant seem to find an appropriate one, any help will be really appreciated
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your code looks a little wrong from here may be cos its 6 am but try this
<img src="YOURIMAGELOCATION" onmouseover="this.src='YOURIMAGELOCATION';" onmouseout="YOURIMAGELOCATION';" />
Note the ; between ' and "
Also if that dont work try changing your mouse over image name
Saying all that I think CSS is a far better/cleaner and crisp way of doing it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kenny if you were a woman and not on the net I'd kiss you, just altered the name of the image to BUY-BUTTON-Blue.png and it worked, so simple yet beautiful
Cheers matey youre a star
All the best
Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi KennyC,
I can see from your post that you really know what you are talking about. Thanks for your input and its great to see that you were able to help another member resolve their issue.
Kudos to you
Please feel free to come back anytime.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And is it possible to add a html code that will change the button image when it is CLICKED?
Is it doable in html? I cannot make onclick or onmousedown to work. I would not like to go into CSS if not absolutely necessary.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes.
<!-- Start mouse over - This line is where the standard commands for the mouse over to change button colors and text--> <input type="image" src="donate_off.gif" border="0" name="submit" alt="Make a Donation Today!" onmouseover="this.src='donate_on.gif'" onmouseout="this.src='donate_off.gif'"> <!-- Note - the line of code below is the mouse over code itself - it uses two identical graphics but each is a different color --> <!-- src="donate_off.gif" border="0" onmouseover="this.src='donate_on.gif'" onmouseout="this.src='donate_off.gif'" -->

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.