|
-
Mar 15th, 2001, 11:43 AM
#1
Thread Starter
Fanatic Member
ok,this works
<a href="somepage.htm" onClick="javascript:document.myForm.submit();">submit</a>
but I need to run use a confirm box before I submit the form.
so I am trying this:
<script>
function ConfirmDelete()
{
if (!confirm)
{return false;}
else
{document.myForm.submit;}
</script>
I don't get an error message but it dosen't submit the form either.
I tried to use location.href but i need to pass some name/value pairs and i couldn't get the variables into my javascript from the asp.
any suggestions?
thanks
-
Mar 15th, 2001, 03:02 PM
#2
function PrintConfirm()
{
var agree=confirm("Are you sure you wish to do this?");
if (agree) {
document.myForm.submit();
}
else {
return false; }
}
-
Mar 15th, 2001, 04:03 PM
#3
Thread Starter
Fanatic Member
i got it.
i was doing it with
<a href="#" onClick="callFunction">
and it needed to be
<a href="javascript:callFunction">
this works.
whoo-ho!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|