Rollover image code

  lonemascot 23:50 28 Aug 08
Locked

Hi I'm website creator newbie

I have started a site where I need to sell items. I have used premade paypal 'view cart' code.

the paypal code is:

form target="paypal" action="click here" method="post">
input type="hidden" name="cmd" value="_cart">
input type="hidden" name="business" value="[email protected]">
input type="image" src="web%20page%20top_r1_c8.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
input type="hidden" name="display" value="1">
/form>

As you can see i have used my own image for the button. This code works fine but i want the image to change as the mouse goes over it.

What is the code I need to input to be able to do this?

The location for my rollover image is 'web%20page%20top_r1_c8_f2.gif'

Thanks

Jon

  Eric10 15:19 29 Aug 08

Add the rollover to the image line as below:

<input type="image" src="web%20page%20top_r1_c8.gif" border="0" onmouseover="javascript:this.src='web%20page%20top_r1_c8_f2.gif';" onmouseout="javascript:this.src='web_page_top_r1_c8.gif';" name="submit" alt="PayPal - The safer, easier way to pay online.">

Taken from click here.

I would also recommend that you replace the spaces in your filenames with underscore characters to avoid them getting changed to the %20 character code.

  Eric10 15:24 29 Aug 08

In the above I had changed the spaces in the filenames when playing with it and forgot to change one instance back. If you are keeping the spaces then the line should read:

<input type="image" src="web%20page%20top_r1_c8.gif" border="0" onmouseover="javascript:this.src='web%20page%20top_r1_c8_f2.gif';" onmouseout="javascript:this.src='web%20page%20top_r1_c8.gif';" name="submit" alt="PayPal - The safer, easier way to pay online.">

  lonemascot 21:23 29 Aug 08

cheers. I'll have a look at your link too and maybe i can learn something about HTML code.

It just looks like a load of jibberish!!

Thank you

This thread is now locked and can not be replied to.

What is ransomware and how do I protect my PC from WannaCry?

What I learned from my mentor, Oscar-winning VFX supervisor Phil Tippett

Siri vs Google Assistant