View Full Version : Confirm problem

12-19-2003, 06:27 PM
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?

12-19-2003, 06:33 PM
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">

12-19-2003, 07:52 PM
This is about confirm, alert, and prompt


12-19-2003, 08:01 PM
Thanks everyone, I'm ahead !!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum