Posted by simon on 10/13/59 11:38
hi Sean, i just changed slightly in ur form tag
<form name="details" method="POST" action="testsend.php"
onSubmit="return submitForms();">
instead of
<form enctype="text/plain" name="details" method="POST"
action="testsend.php" onsubmit="document.details.submit()">
onSubmit = "return submitForms();".. this is to call the function u
made for validation. and it worked fine when i tested. The errors i got
was because of the unusual line breaks this page placed and when i
copied it to my script editor. i just removed the line breaks and then
it worked fine...
the data which i entered in the form is displayed in testsend.php.
And yes ur this function had missing bracket which generates error
function submitForms()
{
if ( (isName() ) && (isEmail()) && (isPhone()) && (isComment()) &&
(isFavorite()) )
{
if (confirm("\nYou're about to send your contact this
message.\n\nClick on YES to send.\n\nClick on NO to abort."))
{
alert("\nYour message will now be sent.\n\n\nThank you!");
return true;
}
else
{
alert("\nYou have chosen not to send the message.");
return false;
}
}
else
return false;
}
I hope it would work in ur corner too.
good luck
regards,
Simon
[Back to original message]
|