Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Substitute Form Button For An Image, homemade images in forms buttons
mizako
post 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!
Go to the top of the page
 
+Quote Post
bureX
post 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!
Go to the top of the page
 
+Quote Post
mizako
post 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"/>
Go to the top of the page
 
+Quote Post
s2city
post 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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Button To Print Current Web Page(14)
  2. Viewing Images(10)
  3. Opening Images In Pictureviewer Instead Of Browser(7)
  4. Radio Button(4)
  5. Submit Button(3)
  6. Image.index.html(10)
  7. Xhtml Forms Layout(8)
  8. Fixed Background Image(10)
  9. Image Doesn't Load(6)
  10. Correct Markup For A List With Big Images(7)
  11. Javascript Back , Forward Or Next Buttons Issue(1)
  12. Double Combo Box Produces Images?(1)
  13. Refresh Page After Back Button Hit(11)
  14. Xhtml Strict Method For Submit/reset Buttons As An(1)
  15. Sending Forms To A Different Location(5)
  1. Usemap And Table Background Image Changing(5)
  2. Ie5 Mac Does Not See My Site(11)
  3. Dynamic Button Size(1)
  4. Multiple Drop Down Menus W/ Submit Button(6)
  5. Getting An Image To Scroll On With Content(13)
  6. Image Roll Over Drop Down Menu Help(2)
  7. Need Help With Image Wrapping(13)
  8. Typing Over Image(7)
  9. Image Links(5)
  10. Background Image Picture On A Website(3)
  11. Help With Background Image(6)
  12. Dynamic Forms Help - How Do I Create These?(8)
  13. My Images Wontshow Online(2)


 



- Lo-Fi Version Time is now: 13th October 2008 - 04:49 PM