Loading ...
Sorry, an error occurred while loading the content.

Stopping for submission using Event

Expand Messages
  • foti-1@comcast.net
    Suppose I want to attach a confirmation dialog to a submit button in a form. Basically, when the user clicks this button, I want to put up a regular old
    Message 1 of 2 , Aug 30, 2006
    • 0 Attachment
      Suppose I want to attach a confirmation dialog to a submit button in a form. Basically, when the user clicks this button, I want to put up a regular old confirm dialog ("Are you sure you want to submit?"). If user clicks cancel, I don't want the form to submit.

      Is it possible to do this using the addListener method? If so, can someone give an example? I've not been able to get one that stops the form from submitting.

      Thanks.
    • Peter Foti
      I found my solution. I had my callback function call YAHOO.util.Event.stopEvent if the user decided not to confirm the submission. Regards, Peter ... From:
      Message 2 of 2 , Aug 30, 2006
      • 0 Attachment
        I found my solution. I had my callback function call
        YAHOO.util.Event.stopEvent if the user decided not to confirm the
        submission.

        Regards,
        Peter

        ----- Original Message -----
        From: <foti-1@...>
        To: <ydn-javascript@yahoogroups.com>
        Sent: Wednesday, August 30, 2006 4:50 PM
        Subject: [ydn-javascript] Stopping for submission using Event


        > Suppose I want to attach a confirmation dialog to a submit button in a
        > form. Basically, when the user clicks this button, I want to put up a
        > regular old confirm dialog ("Are you sure you want to submit?"). If user
        > clicks cancel, I don't want the form to submit.
        >
        > Is it possible to do this using the addListener method? If so, can
        > someone give an example? I've not been able to get one that stops the
        > form from submitting.
        >
        > Thanks.
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.