Nov 22, 2009

Substitute Form Button For An Image - homemade images in forms buttons

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > HTML, XML etc..

Substitute Form Button For An Image - homemade images in forms buttons

mizako
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!

 

 

 


Comment/Reply (w/o sign-up)

bureX
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!

Comment/Reply (w/o sign-up)

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

 

 

 


Comment/Reply (w/o sign-up)

s2city
Keep in mind that some browsers, such as Firefox and Opera won't show your image... they've got default images for Form Buttons.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : substitute, form, button, image, homemade, images, forms, buttons

  1. My Images Wontshow Online
    (2)
  2. Dynamic Forms Help - How Do I Create These?
    (8)
    Hi I have a page with a form with some input fields. When it is submited it goes to the comfirmation
    page. I want the form to have an input / button where if the user can enter/add more fields for
    input. i.e or --> (update this form with more input fields) --> (submit to
    confirm.php) I want the user to be able to enter a value or have a button to be able to add
    more fields. I've tried searching the web but havent been able to find anything that works.....
  3. Help With Background Image
    please? :) (6)
    Ok heres the scoop, i got a background that i made in paint for my website its just like 3 lines for
    the nav bar, banner and other things ect. ect. now when i hosted it on a site and put in the This
    is what it looks like in paint http://img.photobucket.com/albums/v614/Dj1.../background.jpg and
    this is what it looks like when i put it into HTML
    http://img.photobucket.com/albums/v614/Dj169211/Damn.jpg i dont want it tiled like that so is
    there any way that i can change that? any ideas? :| Thanks in advance /smile.gif"
    style="vertical-align:middle" emoid=":)" borde....
  4. Background Image Picture On A Website
    how do u make a pic a backround?? (3)
    ?email me if u know! Trap17 forum asks you to post contributes with substance. ....
  5. Image Links
    (5)
    Ok...another question...may sound stupid, but we're all stupid...how'd I be able to create
    an image link. Uh...let me rephrase this: If I were to create an "Enter" image and wanted people to
    click the image to enter to a certain page, how would I do it without some sort of the famous "Blue
    Line" around it? Any help would be greatly appreciated... /unsure.gif"
    style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" />....
  6. Typing Over Image
    (7)
    Is it possible to have a linked font over an image (not being a background image)? If so, how do I
    accomplish that?....
  7. Need Help With Image Wrapping
    (13)
    ok my problem now is that i need it to auto width the image that needs to be use so then I can use
    tags for the content without the need for the image to expand from left to right. heres the css for
    the image wrap CODE span {     background-image: url(images/gfxtrap_42.gif);
        background-repeat: repeat-y;     background-position: top left, bottom right;     height: 200px;
        border: 0px; } heres the rest of the website code. CODE Untitled Document
        @import "topnav.css";     @import "leftnav.css";     -->          span {     b....
  8. Image Roll Over Drop Down Menu Help
    (2)
    Ok I been searching for days now on a half way descent tutorial on how to do a Image Roll Over Drop
    Down Menu in CSS without the use of javascript, I been seeing alot of the suckerfish set up but of
    course no one goes in to detail on how to set up the image rollover version of it. Plus I don't
    want the dhtml or the javascript setup just good ole pure css. Also I need ot be able to control
    multiple menus in one script as well. CODE   
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Untitled Document ul, li { margin:0;
    padding:0; list-style-type:....
  9. Getting An Image To Scroll On With Content
    (13)
    ok, well i had had people review Hogwartsmagic.net and they said that i should get it to not be one
    huge image as a layout..and i have figured most of it out and it has proven sucessful! but now i am
    having diffuclty, i am pretty much only a basicl HTML kinda person... and i was wondering if anyone
    knows an html code that will allow one image to scroll the entire length of a pages content? for
    example, if i were to add 200 links to the right navigation..the image would go with the content.. i
    am testing it out here HERE any help would be much appreciated....
  10. Multiple Drop Down Menus W/ Submit Button
    (9)
    I am building a page that will have 2 drop down menus and a submit button. The first menu will have
    one set of options, say colors (red, blue, green, yellow). The second menu will have another set of
    options, say sizes (small, medium, large). What I want to be able do is select a color and a size,
    click submit and have it go to the page for those options. So if a user picks 'Red' and
    'Small' and clicks submit they will be linked to page1.html. If they pick 'Blue' and
    'Large', they will be linked to page2.html, and so on. Any ideas how to ....
  11. Dynamic Button Size
    (1)
    In my application I have a custom tag that generates all the action buttons that the page needs. My
    problem is that in IE the space between the left side of the button and the image inside the button
    are not consistant. Some buttons have 3 or 4 more pixels of padding on the left side then others.
    This causes my buttons to be too large and hence the area the buttons are generated in stretches too
    far. I could wrap the buttons around to another line or add scroll bars.. but if it will fit in FF I
    think it should fit in IE as well. So my question is can I set the padding....
  12. Ie5 Mac Does Not See My Site
    It shows the body bg image only... (11)
    Remember that site layout I was hacking down for IE? Which by the way I didnt really like, but it
    was the customer's design... and yes, he is not a graphic designer hehe... Anyway I was really
    surprised that I got to the solution and fixed it... but as I'm testing between browsers, I come
    to see that Internet Explorer in Mac does not show nothing of my page, yet the source code is there,
    if you click command + e in order to see the html source code, its all there! But all I can see from
    the page itself is the body background-image... I tried removing the docty....
  13. Usemap And Table Background Image Changing
    (5)
    I have a menu page that consists of links to other pages. The page has a background image of a
    globe. The globe is divided into seperate sections for each menu item. As a user hovers over each
    section I change the background image(The same globe with that section highlighted.) That is what I
    have so far except that they have to hover over a small anchor tag that I put in not the whole
    section. I want to change it so that they can actually hover over all of the section they are
    selecting. I found usemap online but haven't found any examples where it will actually ch....
  14. Sending Forms To A Different Location
    (5)
    Need some help, i have been out of the HTML programming for a while, and it isn't coming back
    very fast for me, or this isnt possible. Can i send the contents of a form to a different place
    then where the browser goes. I would like to send the contents of a form to a page where it will
    take the data and process it, basically putting all the data into a SQL table and creating a new
    file for the article. I want the user to go to a different page though, actually, back to the same
    form where they put in the information in the first place. Possible? ....
  15. Xhtml Strict Method For Submit/reset Buttons As An
    (1)
    What's the proper way to handle submit and reset buttons? Using type submit and reset don't
    allow you to replace the default button with an image, using the type image doesn't allow a
    button to automatically act like a submit or reset....so far as I know. So How should I do this
    when I want to use a custom image as the button? Code will be best way to explain, thanks! ....
  16. Refresh Page After Back Button Hit
    (14)
    Hi. I have a page that is dynamically build through DOM manipulation. So, when I browse outside the
    page, and then click back, those dynamically created DOM objects are gone. Since I am also using JSP
    / Servlet technology, I can rebuild this page easily, which I have done. Here is my dilemma. If
    the user leaves the dynamic page, then clicks back on their browser, I need the page they are going
    back to to refresh. I can't figure out how to do this. I've tried using the META tag, but it
    won't do it. Help would be appreciated. Thanks. ....
  17. Double Combo Box Produces Images?
    (1)
    I am trying to do a website which requires two drop down boxes that will display different images.
    Basically you select a category then you can select a sub category from the second drop down box.
    Now all the scripts I found online that do this direct you to a link by either pressing Go or some
    kind of submit button. Can some one point me in the right direction to make the selection show
    different images? In the end I want to have an image show up when you select the sub category, then
    have the user be able to drag and drop that image to a different part of the screen....
  18. Javascript Back , Forward Or Next Buttons Issue
    (1)
    Okay webmasters, please put your wizard hats on and work your magic. I have a great little slide
    show that I am working on. I just about have it done, but I have a problem that is driving me
    nuts!!! The problem is my "back" button. Once the back button hits the first image and the user
    clicks back again, a javascript error occurs (it states: That my variable is not defined). I know
    that it is defined otherwise the back button would not work at all. The "next" button does not have
    this problem it will loop continously. I have been researching others slideshows and a lot....
  19. Correct Markup For A List With Big Images
    so that it validates (7)
    How will the correct markup be for a list that has big images (different images each) next to it?
    Like a list of places you can go and each one with a picture of the destination (but not just a
    bullet, and aligned to the right, AND IE compatible).... So that i can use a heading, a little
    description and a floated img to the right, and avoid pasting the img itself in the document, but
    through a css background rule in the given div or whatever... Thanks in advance!....
  20. Image Doesn't Load
    (6)
    Hi, Never hapened to me since HTML was invented. I've got a webpage ( h.shtml - I've also
    tryed .htm, .html ) with the following code: Code: CODE Horoscope    
                                                                 
              pic_01.gif is in the same directory. But the browser doesn't
    show it - it stays in "download mode", as if it was fetching the image from another server instead
    of my local computer... If I use another image, everything's allright. I....
  21. Fixed Background Image
    Just little reminder (12)
    Easy teahnic, post the following codes between and QUOTE body{background-image: url(
    under.gif ); background-repeat:no-repeat; background-attachment : fixed; background-position:
    10% 20% ;} --> For red colour, change it to your image's location. For green colour, it
    is used to set horizontal and vertical position of background image. I hope it can help you.
    /tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /> ....
  22. Xhtml Forms Layout
    all within the standars (8)
    We all remember the good old tables right? When we used them to design or beloved websites. But
    nowadays things have change a little bit, strict code format, css, xhtml and no tables. And so
    when it comes finally to the design of a form, instead of having two rows (left row with the label
    and right row with the input tag) and those rows aligned to look nice (left row= right aligned and
    right row=left aligned), how can we keep order with our fancy style sheet? Thanks in advance.....
  23. Image.index.html
    (10)
    hello there well i designed this image that includes text a logo i shall say i am aware that i need
    to title it index.html when i upload the file i visit my website and it shows the file folder. now i
    only want that image i designed on there so when clients visit my site it only goes to that page the
    rest of my site isent done yet. i want it to be just like the sites you visit and it states
    underconstruction. programs ive tried: indesign, image ready, incopy cs2, dreamweaver. and i
    still dont understand please help meeh thanks oh and what classify's images html,....
  24. Submit Button
    (3)
    I have a form on my page. I do not have a submit button, but when I hit enter on my text field, it
    is like I am clicking on a submit button. My page refreshes to the original state, and my values are
    reset. I found this out because I made a submit button and tried it. Is there a way to get around
    this? I am trying to use a javascript that captures the key strokes. That works, but then the submit
    like event still fires after my code runs, nullifying any changes my code has made. html4strict
    Code: CODE 1.         2.             3.                 4.   ....
  25. Radio Button
    (5)
    I am trying to maintain the radio button selection on a Submit, but the form refreshes to its
    default selection. BTW, After a Submit is clicked, the radio form stays visible on the top of the
    screen while the query results are displayed on the bottom half of the screen (we're using an
    internal, embedded link). That's when the default selection comes into place. Any help would be
    appreciated. Please respond Kvarnerexpress.....
  26. Opening Images In Pictureviewer Instead Of Browser
    Locally (7)
    What I am trying to do is make up a small HTML site which will be based localy on my computer and
    basicly show all of the images I have taken on different holidays. What I want though is when I
    click on an image for it to be opened up in Windows Picture Viewer. As the web site will all be
    saved locally on my computer and not be going on the internet is there any way of achiving this? I
    am running Windows XP Professional if it makes any difference Thank you in advance,kvarnerexpress....
  27. Viewing Images
    Thumbnails to full size (10)
    Hi, Need help designing a thumbnail page in frontpage. Need to have about six thumbnails aligned on
    the right hand side, and when you put the mouse over the thumbnail you can preview the image on the
    same page (as opposed to previewing it in a new window). Does anyone know a good way to do this?
    ....
  28. Button To Print Current Web Page
    (18)
    Hi, Does anyone know how to create a button that will printo out the current page. What I want to
    do is have the user fill out a form (containing name, address, zip, etc). They will then click on a
    "print" button and it will print out the form data. Any ideas? Thanks.....
  29. Enter Keypress Submits Wrong Button
    (2)
    Ive got a form, with a submit button on the left and a submit button on the right. By default on the
    enter keypress, the form submits the left submit button, but i want it to submit the right button.
    How would i accomplish this? kvarnerexpress....
  30. Insert Into Database
    Radio Buttons and dropdown menus (8)
    I am currently working on a registration page but I can't figure out a few things, wich all
    basically have the same thing in common Radio Button: In the registration form i have a gender
    selection and I want to input that into the database, I currently have the following: CODE Male
    Female In the registering file I put the following (edited for the question): CODE $SQL =
    "INSERT into go_logintable(gender ) VALUES ('$gender')"; I have no idea if thats the
    right way to go, so please give me some pointers. ____________________________________ D....

    1. Looking for substitute, form, button, image, homemade, images, forms, buttons

Searching Video's for substitute, form, button, image, homemade, images, forms, buttons
See Also,
advertisement


Substitute Form Button For An Image - homemade images in forms buttons

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com