Image Button and Post Method Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts

  • Ralph Freshour
    Guest replied
    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@NotTellingY a.com> wrote:
    [color=blue]
    >
    >"Ralph Freshour" <ralph@primemai l.com> wrote in message
    >news:ekfuivkgn mak2c2i632nqems 34lfd4ldag@4ax. com...[color=green]
    >> 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...
    >>[/color]
    >
    >
    ><input type="image" border="0" src="images/login.gif" alt="Trade Login">
    >RG
    >
    >
    >[/color]

    Leave a comment:


  • Chris Morris
    Guest replied
    Re: Image Button and Post Method Help

    Ralph Freshour <ralph@primemai l.com> writes:[color=blue]
    > <alex@zaporizhs tal.com> wrote:[color=green]
    > >"Ralph Freshour" <ralph@primemai l.com> wrote in message:[color=darkred]
    > >> I'm trying to use an image as a submit button - I'm reading Sams Teach[/color]
    > >
    > >I hope this will work for you:[/color][/color]

    It doesn't work for me.
    [color=blue][color=green]
    > ><a href="javascrip t:document.form name.submit()">
    > ><img src='button.gif ' alt='button' border=0></a>[/color]
    >
    > I don't understand what this js code does:
    >
    > <a href="javascrip t:document.form name.submit()">[/color]

    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

    and especially

    [color=blue]
    > Don't I need a method post statement in my form?[/color]

    <form method="post" action="submitt othis.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.
    [color=blue]
    > I have several graphical image 'buttons' - when the form is submitted
    > how will the called .php script know which 'button' was clicked on?[/color]



    --
    Chris

    Leave a comment:


  • Ralph Freshour
    Guest replied
    Re: Image Button and Post Method Help

    I don't understand what this js code does:

    <a href="javascrip t:document.form name.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@zaporizhs tal.com> wrote:
    [color=blue]
    >
    >"Ralph Freshour" <ralph@primemai l.com> wrote in message:
    >news:ekfuivkgn mak2c2i632nqems 34lfd4ldag@4ax. com...[color=green]
    >> 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...
    >>[/color]
    >
    >I hope this will work for you:
    >
    ><a href="javascrip t:document.form name.submit()">
    ><img src='button.gif ' alt='button' border=0></a>
    >
    >-
    >Kindest Regards,
    >Olexiy Merenkov
    >http://www.merenkov.com/olexiy
    >[/color]

    Leave a comment:


  • ???????? ??????? ???????
    Guest replied
    Re: Image Button and Post Method Help


    "Ralph Freshour" <ralph@primemai l.com> wrote in message:
    news:ekfuivkgnm ak2c2i632nqems3 4lfd4ldag@4ax.c om...[color=blue]
    > 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...
    >[/color]

    I hope this will work for you:

    <a href="javascrip t:document.form name.submit()">
    <img src='button.gif ' alt='button' border=0></a>

    -
    Kindest Regards,
    Olexiy Merenkov



    Leave a comment:


  • RG
    Guest replied
    Re: Image Button and Post Method Help


    "Ralph Freshour" <ralph@primemai l.com> wrote in message
    news:ekfuivkgnm ak2c2i632nqems3 4lfd4ldag@4ax.c om...[color=blue]
    > 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...
    >[/color]


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




    Leave a comment:


  • Ralph Freshour
    Guest started a topic Image Button and Post Method Help

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

Working...