Rollover image code

  lonemascot 23:50 28 Aug 2008

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">

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'



  Eric10 15:19 29 Aug 2008

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 2008

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 2008

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.

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

Awful clip art from 1994 is being tweeted every hour by a bot

How to update iOS on iPhone or iPad

Les meilleures applications pour enfants 2017