|
|
|
|
![]() ![]() |
Jul 11 2005, 09:51 AM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 372 Joined: 16-August 04 From: Spain Member No.: 824 |
Hi,
I have the next formular : CODE <form method='post' action='index.php?mode=2&id=1'> <input type='hidden' name='name' value='Canon Digital Ixus 700'/> <input type='hidden' name='id' value='1'/> <input type='hidden' name='qty' value='1'> <input type='hidden' name='cost' value='40'> <input type='submit' value='Add to cart' name='add'> </form> I want to substitue the add button for an image CODE <img src="./images/kaufen.jpg" /> that i created but i want still to have the same funcitonlity when someone clicks. How can i do this?Thanks in advanced! |
|
|
|
Jul 11 2005, 01:21 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 318 Joined: 5-January 05 Member No.: 3,136 |
Hi there!
You need to replace your image with this code: <INPUT TYPE="image" SRC="./images/kaufen.jpg" BORDER=0 ALT="Submit"> This will make the image "./images/kaufen.jpg" act as a button. Make sure that the BORDER property is set to 0 (like in my example) to avoid your image from getting an ugly blue border. Don't forget, this code has to be inside the <form> </form> tags! |
|
|
|
Jul 12 2005, 04:40 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 372 Joined: 16-August 04 From: Spain Member No.: 824 |
QUOTE(bureX @ Jul 11 2005, 01:21 PM) Hi there! You need to replace your image with this code: <INPUT TYPE="image" SRC="./images/kaufen.jpg" BORDER=0 ALT="Submit"> This will make the image "./images/kaufen.jpg" act as a button. Make sure that the BORDER property is set to 0 (like in my example) to avoid your image from getting an ugly blue border. Don't forget, this code has to be inside the <form> </form> tags! Thanks it works, but i have to use an hidden input field to obtain the desire effect too. I explain myself: <INPUT TYPE="image" name="kaufen" SRC="./images/kaufen.jpg" BORDER=0 ALT="Submit"> Does not work instead i have to use: <input type="hidden" name="kaufen" value="kaufen"/> <input type="image" src="./images/kaufen.jpg" value="submit"/> |
|
|
|
Jul 12 2005, 05:12 PM
Post
#4
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 155 Joined: 9-October 04 Member No.: 1,586 |
Keep in mind that some browsers, such as Firefox and Opera won't show your image... they've got default images for Form Buttons.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 13th October 2008 - 04:49 PM |