dmccarty
asked on
OnSubmit Post Problem
Ok,
Here's the problem. I am submitting form responses into a database. I am using the OnSubmit Handler and the POST form method. I call the function (Save It () ) on the form submission. The posting of the data goes through (because I get returned info from the database) but it will not recognize the form name ( Srch ). It says Srch not defined.
My question is... Can you use POST and OnSubmit in this manner. If not how do you go about doing these two things at once ??
Here are the Snippets of code......
-----------------------(Th e Function)----------------- -----
<Script Language="javascript">
<!-- Hide it
function SaveIt ()
{
if (Srch.Skills.value.length != 0)
{
var expdate = new Date ();
expdate.setTime(expdate.ge tTime() + (24 * 60 * 60 * 1000));
SetCookie('Skills',Srch.Sk ills.value , expdate);
SetCookie('Phone',Srch.Loc ation.valu e, expdate);
SetCookie('Travel_Location ',Srch.Tra vel_Locati on.value,
expdate);
}
else
{
alert('You left a field blank.');
return false;
}
}
// done -->
</script>
-----------------------(Th e Code)--------------------- ----
<form name="Srch" OnSubmit="SaveIt ()" Method="POST" ACTION="http://206.201.123.139/scripts/acc2web.exe">
<FONT FACE="ARIAL,HELVETICA" SIZE="+1">
<CENTER><Table border="3"><td><IMG SRC="fire3.gif"></td></tab le>
<br>
<br>
</center>
<H2><u>Query Information Area</u></H2>
<br>
<font size="+0">My <i>ideal</i> candidate would....<br><br>
<TABLE BORDER="0">
<TR>
<td align="left">
<INPUT TYPE="hidden" NAME="DbName" VALUE="c:\Webshare\wwwroot \iteam\dat abase\pers on.mdb">
Have the following skills :
</td>
<td align="left">
<INPUT TYPE=text SIZE=24 NAME="Skills">
-------------------------- -(End)---- ---------- ---------- -
Thanks !!!!
Here's the problem. I am submitting form responses into a database. I am using the OnSubmit Handler and the POST form method. I call the function (Save It () ) on the form submission. The posting of the data goes through (because I get returned info from the database) but it will not recognize the form name ( Srch ). It says Srch not defined.
My question is... Can you use POST and OnSubmit in this manner. If not how do you go about doing these two things at once ??
Here are the Snippets of code......
-----------------------(Th
<Script Language="javascript">
<!-- Hide it
function SaveIt ()
{
if (Srch.Skills.value.length != 0)
{
var expdate = new Date ();
expdate.setTime(expdate.ge
SetCookie('Skills',Srch.Sk
SetCookie('Phone',Srch.Loc
SetCookie('Travel_Location
expdate);
}
else
{
alert('You left a field blank.');
return false;
}
}
// done -->
</script>
-----------------------(Th
<form name="Srch" OnSubmit="SaveIt ()" Method="POST" ACTION="http://206.201.123.139/scripts/acc2web.exe">
<FONT FACE="ARIAL,HELVETICA" SIZE="+1">
<CENTER><Table border="3"><td><IMG SRC="fire3.gif"></td></tab
<br>
<br>
</center>
<H2><u>Query Information Area</u></H2>
<br>
<font size="+0">My <i>ideal</i> candidate would....<br><br>
<TABLE BORDER="0">
<TR>
<td align="left">
<INPUT TYPE="hidden" NAME="DbName" VALUE="c:\Webshare\wwwroot
Have the following skills :
</td>
<td align="left">
<INPUT TYPE=text SIZE=24 NAME="Skills">
--------------------------
Thanks !!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.