Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Confirm problem

  1. #1
    New to the CF scene
    Join Date
    Dec 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Confirm problem

    I'm trying to work with a form and I having problem with the confirm action, always seems to return false. I tried with onclick and the same problem, what am I doing wrong ?

    one way:

    <form method=post action=anotherform.html name=asgfrm onSubmit="return confirm("yes or no ?")">


    other way:

    <form method=post action=anotherform.html name=asgfrm>

    <input type=submit name=submit value=Assign onclick="return confirm("yes or no ?")">

    Any ideas?

  • #2
    New to the CF scene
    Join Date
    Dec 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you need to use single quotes inside the confirm part.

    the code below will take you too google if the okay button was pressed.

    <form action="http://www.google.com" onSubmit="return(confirm('yes or no ?'));">
    <input type="submit">
    </form>

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    This might help!!!!!!!

    This is about confirm, alert, and prompt

    http://www.javascriptkit.com/javatutors/alert1.shtml

  • #4
    New to the CF scene
    Join Date
    Dec 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks everyone, I'm ahead !!


  •  

    Posting Permissions

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