Questiion on "Are you sure"

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

    Questiion on "Are you sure"

    I have a page that has three submit buttons. Depending upon which one
    was clicked, I process it differently on the server in php. One of
    those buttons is a delete action so I would like to add an "Are you
    sure?" for that button. However, I don't want to do anything with the
    other buttons.

    I know how to do it if that were the only button ( onsubmit="retur n
    validateAction( )" ).
  • Evertjan.

    #2
    Re: Questiion on "Are you sure"

    sheldonlg wrote on 22 aug 2008 in comp.lang.javas cript:
    I have a page that has three submit buttons. Depending upon which one
    was clicked, I process it differently on the server in php. One of
    those buttons is a delete action so I would like to add an "Are you
    sure?" for that button. However, I don't want to do anything with the
    other buttons.
    >
    I know how to do it if that were the only button ( onsubmit="retur n
    validateAction( )" ).
    >
    <input onclick = 'return .......'

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Bart Van der Donck

      #3
      Re: Questiion on &quot;Are you sure&quot;

      sheldonlg wrote:
      I have a page that has three submit buttons.  Depending upon which one
      was clicked, I process it differently on the server in php.  One of
      those buttons is a delete action so I would like to add an "Are you
      sure?" for that button.  However, I don't want to do anything with the
      other buttons.
      >
      I know how to do it if that were the only button ( onsubmit="retur n
      validateAction( )" ).
      <input type="submit" name="action" value="Update">
      <input type="submit" name="action" value="Delete"
      onClick="if (!confirm('Sure ?')) return false;">

      The 'name'-argument can be used to set the value of 'action' in PHP
      (Delete or Update).

      Hope this helps,

      --
      Bart

      Comment

      • Evertjan.

        #4
        Re: Questiion on &quot;Are you sure&quot;

        Bart Van der Donck wrote on 23 aug 2008 in comp.lang.javas cript:
        sheldonlg wrote:
        >
        >I have a page that has three submit buttons.  Depending upon which one
        >was clicked, I process it differently on the server in php.  One of
        >those buttons is a delete action so I would like to add an "Are you
        >sure?" for that button.  However, I don't want to do anything with the
        >other buttons.
        >>
        >I know how to do it if that were the only button ( onsubmit="retur n
        >validateAction ()" ).
        >
        <input type="submit" name="action" value="Update">
        <input type="submit" name="action" value="Delete"
        onClick="if (!confirm('Sure ?')) return false;">
        onClick = "return confirm('Sure ?');"
        The 'name'-argument can be used to set the value of 'action' in PHP
        (Delete or Update).


        --
        Evertjan.
        The Netherlands.
        (Please change the x'es to dots in my emailaddress)

        Comment

        Working...