...

View Full Version : Confirm problem



fdocruz
12-19-2003, 07: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?

mseeley
12-19-2003, 07: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">
</form>

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

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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum