Image Button and Post Method Help

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Image Button and Post Method Help

    I'm trying to use an image as a submit button - I'm reading Sams Teach
    Yourself HTML and the chapter on this doesn't show me the details on
    how this is done - I mean I can't seem to see it or grasp how this
    works?

    I see the tag for the image and I assume I need a form get or post
    line but how are the two connected so the clicking on the image button
    activates the post method?

    Thanks...

    Ralph Freshour Guest

  2. Similar Questions and Discussions

    1. Post method
      Hi there Someone know how to capture the vars and values from the POST method, such like a Matts' FormMail, i want to do somethink like that, and...
    2. GET or POST method??
      I wonder when we should use GET method, when we should use POST method? GET method only sends limited amount of data, and it will show the data as...
    3. using post method
      Hello All, I am trying to use the post method in perl to fill a form. The form is actually for sending an instant message to a cell phone, i would...
    4. ASP, FORMS, POST METHOD And Post with out form(???)
      Lets see if I can decribe, this... I have a form on an html page, that will call a remote site with a post method. Prior to running off to the...
    5. POST method and xls file
      Normally users compile a php page to introduce some informations, then these infomations are put-in in 10 different array and with POST method...
  3. #2

    Default Re: Image Button and Post Method Help


    "Ralph Freshour" <ralph@primemail.com> wrote in message:
    news:ekfuivkgnmak2c2i632nqems34lfd4ldag@4ax.com...
    > I'm trying to use an image as a submit button - I'm reading Sams Teach
    > Yourself HTML and the chapter on this doesn't show me the details on
    > how this is done - I mean I can't seem to see it or grasp how this
    > works?
    >
    > I see the tag for the image and I assume I need a form get or post
    > line but how are the two connected so the clicking on the image button
    > activates the post method?
    >
    > Thanks...
    >
    I hope this will work for you:

    <a href="javascript:document.formname.submit()">
    <img src='button.gif' alt='button' border=0></a>

    -
    Kindest Regards,
    Olexiy Merenkov
    [url]http://www.merenkov.com/olexiy[/url]


    ???????? ??????? ??????? Guest

  4. #3

    Default Re: Image Button and Post Method Help

    I don't understand what this js code does:

    <a href="javascript:document.formname.submit()">

    Don't I need a method post statement in my form?
    I have several graphical image 'buttons' - when the form is submitted
    how will the called .php script know which 'button' was clicked on?


    On Tue, 5 Aug 2003 13:04:27 +0300, "???????? ??????? ???????"
    <alex@zaporizhstal.com> wrote:
    >
    >"Ralph Freshour" <ralph@primemail.com> wrote in message:
    >news:ekfuivkgnmak2c2i632nqems34lfd4ldag@4ax.com.. .
    >> I'm trying to use an image as a submit button - I'm reading Sams Teach
    >> Yourself HTML and the chapter on this doesn't show me the details on
    >> how this is done - I mean I can't seem to see it or grasp how this
    >> works?
    >>
    >> I see the tag for the image and I assume I need a form get or post
    >> line but how are the two connected so the clicking on the image button
    >> activates the post method?
    >>
    >> Thanks...
    >>
    >
    >I hope this will work for you:
    >
    ><a href="javascript:document.formname.submit()">
    ><img src='button.gif' alt='button' border=0></a>
    >
    >-
    >Kindest Regards,
    >Olexiy Merenkov
    >[url]http://www.merenkov.com/olexiy[/url]
    >
    Ralph Freshour Guest

  5. #4

    Default Re: Image Button and Post Method Help

    Ralph Freshour <ralph@primemail.com> writes:
    > <alex@zaporizhstal.com> wrote:
    > >"Ralph Freshour" <ralph@primemail.com> wrote in message:
    > >> I'm trying to use an image as a submit button - I'm reading Sams Teach
    > >
    > >I hope this will work for you:
    It doesn't work for me.
    > ><a href="javascript:document.formname.submit()">
    > ><img src='button.gif' alt='button' border=0></a>
    >
    > I don't understand what this js code does:
    >
    > <a href="javascript:document.formname.submit()">
    It, in browsers with Javascript enabled, possibly submits the form
    where the opening <form> tag has the name attribute name="formname".

    In browsers with Javascript disabled it does absolutely nothing, apart
    from really winding up the user when they discover the form won't
    submit. This is a bigger problem with longer forms.

    For a better solution, you should read
    [url]http://www.cs.tut.fi/~jkorpela/forms/index.html[/url]
    and especially
    [url]http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html[/url]
    > Don't I need a method post statement in my form?
    <form method="post" action="submittothis.php">

    You don't necessarily need it, forms *can* be submitted with 'get'
    instead, though whether you *should* or not depends on what the form does.
    > I have several graphical image 'buttons' - when the form is submitted
    > how will the called .php script know which 'button' was clicked on?
    [url]http://ppewww.ph.gla.ac.uk/%7eflavell/www/trysub.html[/url]

    --
    Chris
    Chris Morris Guest

  6. #5

    Default Re: Image Button and Post Method Help


    "Ralph Freshour" <ralph@primemail.com> wrote in message
    news:ekfuivkgnmak2c2i632nqems34lfd4ldag@4ax.com...
    > I'm trying to use an image as a submit button - I'm reading Sams Teach
    > Yourself HTML and the chapter on this doesn't show me the details on
    > how this is done - I mean I can't seem to see it or grasp how this
    > works?
    >
    > I see the tag for the image and I assume I need a form get or post
    > line but how are the two connected so the clicking on the image button
    > activates the post method?
    >
    > Thanks...
    >

    <input type="image" border="0" src="images/login.gif" alt="Trade Login">
    RG




    RG Guest

  7. #6

    Default Re: Image Button and Post Method Help

    OK, I got it to work and now when I click on one of my image 'buttons'
    I can detect which one - however, now I'm reading and trying to see
    how to call the correct php script based on what was clicked on.

    On my home page I call via post method a dispatch.php script and in
    that script I detect which button was clicked on - how do I just call
    another php script? For example, if I click on Create I would need to
    call the create.php script, if I click on Delete I need to call
    delete.php

    Thanks...


    On Tue, 5 Aug 2003 08:46:32 -0700, "RG" <Me@NotTellingYa.com> wrote:
    >
    >"Ralph Freshour" <ralph@primemail.com> wrote in message
    >news:ekfuivkgnmak2c2i632nqems34lfd4ldag@4ax.com.. .
    >> I'm trying to use an image as a submit button - I'm reading Sams Teach
    >> Yourself HTML and the chapter on this doesn't show me the details on
    >> how this is done - I mean I can't seem to see it or grasp how this
    >> works?
    >>
    >> I see the tag for the image and I assume I need a form get or post
    >> line but how are the two connected so the clicking on the image button
    >> activates the post method?
    >>
    >> Thanks...
    >>
    >
    >
    ><input type="image" border="0" src="images/login.gif" alt="Trade Login">
    >RG
    >
    >
    >
    Ralph Freshour Guest

  8. #7

    Default Re: Image Button and Post Method Help

    What should i write in the javascript which is connected to the button.
    Unregistered Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139