[thelist] JAVASCRIPT: confirmation dialog box that actually w orks!

David at softv.net David at softv.net
Thu Aug 29 11:46:00 CDT 2002


Give this a try:

<form action="" method="POST">
<input type="Button" value="Test" id="myButton" onClick="validate()">

<script language="JavaScript">

function validate()
{
	conf = confirm("Are you sure?");
	document.write(conf);
}

</script>
</form>



<%
David Mitchell
Application Developer
david at sofTV.net
sofTV.net
www.sofTV.net
613.729.6400 x268
%>

-----Original Message-----
From: Chris W. Parker [mailto:cparker at swatgear.com]
Sent: Thursday, August 29, 2002 12:33 PM
To: thelist at lists.evolt.org
Subject: [thelist] JAVASCRIPT: confirmation dialog box that actually
works!


hi.

i am creating a small script that as of now immediately creates an email
and sends it. i'd like to add a confirmation box when the user press the
submit button and ask them to verify the important information in the
form.

typing "javascript confirmation box" in google gives you a lot of
results, but none of them seemed to work. they all continued to submit
the form normally even if i clicked cancel. i want the form submission
to just be canceled.


thanks
for
the
help,
chris.
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !



More information about the thelist mailing list