Solved

OnSubmit , is not.

Posted on 2002-04-16
14
493 Views
Last Modified: 2006-11-17
Howdy All,

Can someone please take a look at this form, and tell me why my alerts are not working onSubmit???

http://www.geoc...om/nfroio/certform_validate.html

The section that is not working is the:

Coverage & Limit Information

Coverages      Limits Required
 
onSubmit, if the numbers are above $1M, the alerts should show, but alas, they do not, but I am not getting any JS errors either??

---------------------------------------------------------

I asked this question at "another site" wink, wink, nudge, nudge, but alas, i need further help... you can e-mail at nfroio@yahoo.com for the url link to that question, as E-E Admin dont want that site listed here at all, in any context, and I will respect that wish.

nfroio

0
Comment
Question by:nfroio
  • 5
  • 5
  • 3
  • +1
14 Comments
 
LVL 9

Expert Comment

by:amx
ID: 6946555
your missing a end brace '}' at line 63.

thats the one at the end of the 'function valid(form)'.
0
 
LVL 9

Expert Comment

by:amx
ID: 6946568
it may help if the form tag has a name and also the onSubmit also only needs to appear once, again in the form tag.

hope that helps

:o)
0
 
LVL 5

Author Comment

by:nfroio
ID: 6947939
Please do not lock my questions, I will award the points if the comment works, plus, you have made it so others will not look at my question...

Thank you, I will test out your comments and get back to you...

nfroio
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 9

Expert Comment

by:amx
ID: 6947949
sorry
0
 
LVL 5

Author Comment

by:nfroio
ID: 6947952
No worries, I just prefer to have any and all input until the solution is found... thanks for understanding.

nfroio
0
 
LVL 2

Expert Comment

by:thor918
ID: 6949094
hmm I'm not completyly sure about what you are about to do.. But for starters you have a bunch of rare tags called onsubmit.. and no name for the form tag.. and you have forgotten a braccet in one function.. and the valid function is never called..

here is one modified version ->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0054)http://www.geocities.com/nfroio/certform_validate.html -->
<HTML><HEAD><TITLE>Liability Certificate Request Form</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META content=0 http-equiv=expires>
<SCRIPT language=JavaScript>
<!--
function valid() {
  var field0 = myform.Amount;
  var field1 = myform.Amount1;
  var field2 = myform.Amount2;
  var field3 = myform.Amount3;
  var userAmount0 = parseInt(field0.value);
  var userAmount1 = parseInt(field1.value);
  var userAmount2 = parseInt(field2.value);
  var userAmount3 = parseInt(field3.value);
  var errorcheck = 0 //start off with 0 errors
 
  if(!userAmount0) {
    alert("You must input a desired coverage limit.0");
    //return false;
      errorcheck++;
  }else if (userAmount <= 1000000) {  
      alert("Thank you.");  
      //return true;
    } else {
        alert("Limits for this type of coverage are $1,000,000.00, please enter a desired coverage limit that is $1,000,000.00 or under. If you require limits of more than $1,000,000.00, please call the Los Angeles CSBU Client Connection hotline at (866) 283-7123 for assistance with your request.");
        field0.focus();
        field0.select();
        //return false;
            errorcheck++;
  }

   if (!userAmount1) {
    alert("You must input a desired coverage limit.1");
    //return false;
      errorcheck++;
   } else if (userAmount1 <= 1000000) {  
      alert("Thank you.");  
      //return true;
    } else {
        alert("Limits for this type of coverage are $1,000,000.00, please enter a desired coverage limit that is $1,000,000.00 or under. If you require limits of more than $1,000,000.00, please call the Los Angeles CSBU Client Connection hotline at (866) 283-7123 for assistance with your request.");
        field1.focus();
        field1.select();
        //return false;
            errorcheck++;
   }

   if (!userAmount2) {
    alert("You must input a desired coverage limit.2");
    //return false;
      errorcheck++;
   } else if (userAmount2 <= 1000000) {  
      alert("Thank you.");  
      //return true;
    } else {
        alert("Limits for this type of coverage are $1,000,000.00, please enter a desired coverage limit that is $1,000,000.00 or under. If you require limits of more than $1,000,000.00, please call the Los Angeles CSBU Client Connection hotline at (866) 283-7123 for assistance with your request.");
        field2.focus();
        field2.select();
        //return false;
            errorcheck++;
   }

    if (!userAmount3) {
    alert("You must input a desired coverage limit.3");
    //return false;
      errorcheck++;
    } else if (userAmount3 <= 100000000) {  
      alert("Thank you.");  
      //return true;
    } else {
        alert("Limits for this type of coverage are $100,000,000.00, please enter a desired coverage limit that is $100,000,000.00 or under. If you require limits of more than $100,000,000.00, please call the Los Angeles CSBU Client Connection hotline at (866) 283-7123 for assistance with your request.");
        field3.focus();
        field3.select();
       // return false;
         errorcheck++;
   }
   
   if(errorcheck==0){
   return true;
   }else{
   return false;
   }
}
// -->
</SCRIPT>

<SCRIPT language=JavaScript>
<!--
function drawAlert3 () {
alert ("Please input Additional Insured Name here");
}
// -->
</SCRIPT>
<LINK href="/stylesheets/AonLinev4.0.css" rel=StyleSheet type=text/css>
<META content="MSHTML 5.00.3103.1000" name=GENERATOR></HEAD>
<BODY>
<CENTER>If you are having any difficulties with this form, please call the Aon
Client Service Business Units Client Connection<BR>at (866) 283-7123 for
assistance.</CENTER>
<HR>

<DIV class=SectionTitle><B>Certificates</b></DIV><B>
<P class=PageTitle>
<CENTER>Liability Certificate Request Form</CENTER></B>
<P></P>
<FORM name="myform" onSubmit="return valid();" action="#" method="post">
<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD noWrap width="21%">Date of Request: <INPUT name=pos1
      size=8>&nbsp;&nbsp; </TD>
    <TD noWrap width="21%">Date Needed By: <INPUT name=pos2
      size=8>&nbsp;&nbsp; </TD>
    <TD width="13%">Standard <INPUT name=pos3 type=checkbox>&nbsp;&nbsp; </TD>
    <TD width="12%">24 Hour <INPUT name=pos4 type=checkbox>&nbsp;&nbsp; </TD>
    <TD width="12%">Rush <INPUT name=pos4 type=checkbox>&nbsp;&nbsp;
  </TD></TR></TBODY></TABLE><BR><B>
<P><BR></P></B>
<TABLE border=0 cellPadding=1 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD width="38%"><B>Requestor Information</B></TD>
    <TD width="62%"><B><FONT color=#ff0000>Mandatory Field</FONT></B>
  </TD></TR></TBODY></TABLE><BR>
<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD vAlign=top width="20%">
      <P>CalPERS Partner Name: </P></TD>
    <TD vAlign=top width="18%"><INPUT name=pos6> </TD>
    <TD vAlign=top width="14%">Location Code:</TD>
    <TD noWrap vAlign=top width="48%"><SELECT name=select> <OPTION
        selected><OPTION>APT<OPTION>IND<OPTION>LAND<OPTION>MALL<OPTION>OFF<OPTION>RET<OPTION>SHP</OPTION></SELECT>
      <SELECT name=select> <OPTION
        selected><OPTION>BSP<OPTION>CAL<OPTION>CWP<OPTION>FWR<OPTION>GID<OPTION>HIN<OPTION>IIP<OPTION>KA<OPTION>LAS<OPTION>LEN<OPTION>MAC<OPTION>NRP<OPTION>PERS<OPTION>RRF<OPTION>SSR</OPTION></SELECT>
      <INPUT maxLength=6 name=pos73 size=5> <INPUT maxLength=3 name=pos74
      size=2> </TD></TR>
  <TR>
    <TD noWrap vAlign=top width="20%">
      <P>CalPERS Partnership Name: </P></TD>
    <TD vAlign=top width="18%"><INPUT name=pos8> </TD>
    <TD vAlign=top width="14%">Location Name:</TD>
    <TD vAlign=top width="48%"><INPUT name=pos9> </TD></TR>
  <TR>
    <TD vAlign=top width="20%">
      <P>Requestor Name: </P></TD>
    <TD vAlign=top width="18%"><INPUT name=pos10> </TD>
    <TD vAlign=top width="14%">Street: </TD>
    <TD vAlign=top width="48%"><INPUT name=pos92> </TD></TR>
  <TR>
    <TD vAlign=top width="20%">Telephone No:</TD>
    <TD vAlign=top width="18%"><INPUT name=pos12> </TD>
    <TD vAlign=top width="14%">Suite/Pad:</TD>
    <TD vAlign=top width="48%"><INPUT name=pos93> </TD></TR>
  <TR>
    <TD vAlign=top width="20%">Email:</TD>
    <TD vAlign=top width="18%"><INPUT name=pos13> </TD>
    <TD vAlign=top width="14%">City, State, Zip:</TD>
    <TD vAlign=top width="48%"><INPUT name=pos94> </TD></TR>
  <TR>
    <TD vAlign=top width="20%">&nbsp;</TD>
    <TD vAlign=top width="18%">&nbsp;</TD>
    <TD vAlign=top width="14%">Fax Number:</TD>
    <TD vAlign=top width="48%"><INPUT name=pos14> </TD></TR></TBODY></TABLE>
<P><BR></P><B>
<P>Certificate Holder Information
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Certificate Receiver Information</P></B>
<TABLE border=0 cellPadding=3 cellSpacing=0 width="80%">
  <TBODY>
  <TR>
    <TD vAlign=top width="20%">
      <P>Certificate Holder: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos15> </TD>
    <TD vAlign=top width="20%">
      <P>Certificate Receiver: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos20> </TD></TR>
  <TR>
    <TD vAlign=top width="20%">
      <P>Street: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos922> </TD>
    <TD vAlign=top width="20%">
      <P>Street: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos922> </TD></TR>
  <TR>
    <TD noWrap vAlign=top width="20%">Suite/Pad:</TD>
    <TD vAlign=top width="80%"><INPUT name=pos923> </TD>
    <TD noWrap vAlign=top width="20%">Suite/Pad:</TD>
    <TD vAlign=top width="80%"><INPUT name=pos923> </TD></TR>
  <TR>
    <TD noWrap vAlign=top width="20%">City, State, Zip</TD>
    <TD vAlign=top width="80%"><INPUT name=pos924> </TD>
    <TD noWrap vAlign=top width="20%">City, State, Zip</TD>
    <TD vAlign=top width="80%"><INPUT name=pos924> </TD></TR>
  <TR>
    <TD vAlign=top width="20%">
      <P>Attention: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos17> </TD>
    <TD vAlign=top width="20%">
      <P>Attention: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos17> </TD></TR>
  <TR>
    <TD vAlign=top width="20%">
      <P>Fax Number: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos18> </TD>
    <TD vAlign=top width="20%">
      <P>Fax Number: </P></TD>
    <TD vAlign=top width="80%"><INPUT name=pos18>
</TD></TR></TBODY></TABLE><BR><BR><B>Coverage &amp; Limit
Information<BR><BR></B>
<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD colSpan=2 vAlign=top><B>
      <P>Coverages </P></B></TD>
    <TD vAlign=top width="80%"><B>
      <P>Limits Required </P></B></TD></TR>
  <TR>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos18 type=checkbox> </P></TD>
    <TD vAlign=top width="16%">General Liability:</TD>
    <TD vAlign=top width="80%">
      <P>Amount:<BR><INPUT name=Amount>
    <BR></P></TD></TR>
  <TR>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos20 type=checkbox> </P></TD>
    <TD vAlign=top width="16%">Auto Liability:</TD>
    <TD vAlign=top width="80%">
      <P>Amount:<BR><INPUT name=Amount1>
    <BR></P></TD></TR>
  <TR>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos24 type=checkbox> </P></TD>
    <TD vAlign=top width="16%">Garage Liability:</TD>
    <TD vAlign=top width="80%">
      <P>Amount:<BR><INPUT name=Amount2>
    <BR></P></TD></TR>
  <TR>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos27 type=checkbox> </P></TD>
    <TD vAlign=top width="16%">Excess Liability:</TD>
    <TD vAlign=top width="80%">
      <P>Amount:<BR><INPUT name=Amount3>
    <BR></P></TD></TR></TBODY></TABLE>
<P></P>
<P><B><BR>Additional Insureds / Interests</B> (Check all that apply)</P>
<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD vAlign=top width="2%">
      <P><INPUT name=pos30 type=checkbox> </P></TD>
    <TD noWrap vAlign=top width="17%">Additional Insured:</TD>
    <TD vAlign=top width="21%"><INPUT name=pos31 onfocus=drawAlert3()> </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos32 type=checkbox> </P></TD>
    <TD vAlign=top width="12%">Vendor:</TD>
    <TD vAlign=top width="44%"><INPUT name=pos33> </TD></TR>
  <TR>
    <TD vAlign=top width="2%">
      <P><INPUT name=pos34 type=checkbox> </P></TD>
    <TD noWrap vAlign=top width="17%">Loss Payee:</TD>
    <TD vAlign=top width="21%"><INPUT name=pos35> </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos322 type=checkbox> </P></TD>
    <TD vAlign=top width="12%">Other:*</TD>
    <TD vAlign=top width="44%"><INPUT name=pos332> </TD></TR>
  <TR>
    <TD vAlign=top width="2%">
      <P><INPUT name=pos36 type=checkbox> </P></TD>
    <TD vAlign=top width="17%">Lessor:</TD>
    <TD vAlign=top width="21%"><INPUT name=pos37> </TD>
    <TD colSpan=3 vAlign=top>*Other will require CalPERS Risk Management
      approval&nbsp; </TD></TR></TBODY></TABLE><BR><BR><B>
<P>Cancellation Clause</P></B>
<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD noWrap vAlign=top width="39%">
      <P>Number of days notice for <B>Cancellation</B> required? <INPUT
      name=pos43 type=checkbox> 30 days </P></TD></TR></TBODY></TABLE>
<P></P><B>
<P><BR>Description / Reference / Special Instructions</P></B>
<P><TEXTAREA cols=40 name=pos48 rows=5></TEXTAREA> </P>
<P><BR><B>Distribution
</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<FONT size=-2>Area Code | Number</FONT>
<TABLE border=0 cellPadding=3 cellSpacing=0 width="100%">
  <TBODY>
  <TR>
    <TD noWrap vAlign=top width="14%">
      <P>Original to*: </P></TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos45 type=checkbox> </P></TD>
    <TD vAlign=top width="22%">Certificate Holder </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos46 type=checkbox> </P></TD>
    <TD vAlign=top width="20%">By Mail </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos47 type=checkbox> </P></TD>
    <TD vAlign=top width="32%">By Fax # &nbsp;&nbsp;<INPUT maxLength=3
      name=fax1 size=2><INPUT maxLength=8 name=fax2 size=7> </TD></TR>
  <TR>
    <TD vAlign=top width="14%">&nbsp;</TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos48 type=checkbox> </P></TD>
    <TD vAlign=top width="22%">Carrier </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos49 type=checkbox> </P></TD>
    <TD vAlign=top width="20%">By Mail </TD>
    <TD vAlign=top width="4%">
      <P><B><INPUT name=pos50 type=checkbox></B> </P></TD>
    <TD vAlign=top width="32%">By Fax # &nbsp;&nbsp;<INPUT maxLength=3
      name=fax1 size=2><INPUT maxLength=8 name=fax2 size=7> </TD></TR>
  <TR>
    <TD vAlign=top width="14%">&nbsp;</TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos51 type=checkbox> </P></TD>
    <TD vAlign=top width="22%">Named Insured </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos49 type=checkbox> </P></TD>
    <TD vAlign=top width="20%">By Mail </TD>
    <TD vAlign=top width="4%">
      <P><B><INPUT name=pos50 type=checkbox></B> </P></TD>
    <TD vAlign=top width="32%">By Fax # &nbsp;&nbsp;<INPUT maxLength=3
      name=fax1 size=2><INPUT maxLength=8 name=fax2 size=7> </TD></TR>
  <TR>
    <TD vAlign=top width="14%">&nbsp;</TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos51 type=checkbox> </P></TD>
    <TD vAlign=top width="22%">Other </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos52 type=checkbox> </P></TD>
    <TD vAlign=top width="20%">By Mail </TD>
    <TD vAlign=top width="4%">
      <P><INPUT name=pos53 type=checkbox> </P></TD>
    <TD vAlign=top width="32%">By Fax # &nbsp;&nbsp;<INPUT maxLength=3
      name=fax1 size=2><INPUT maxLength=8 name=fax2 size=7> </TD></TR></TBODY></TABLE>
<P>* Copies will be automatically sent to the Named Insured unless otherwise
instructed</P>
<P align=center>
<CENTER>
<TABLE border=0 cellPadding=3 cellSpacing=1 width=318>
  <TBODY>
  <TR>
    <TD align=middle vAlign=top width="51%"><INPUT type=submit value=Send></TD>
    <TD align=middle vAlign=top
  width="49%"><INPUT type=reset value=Reset></TD></TR></TBODY></TABLE></CENTER><BR><BR>
<P align=center><B>* This request form will be sent via email to:</B><BR><!-- insert name of email recipient and phone/fax here... --><A
href="mailto:CSBU_@ars.aon.com">Los Angeles CSBU</A><BR>cc: </P><BR><BR>
<HR class=TrailorRule SIZE=1>
</FORM></BODY></HTML>
0
 
LVL 5

Author Comment

by:nfroio
ID: 6949121
Hello thor,

thank you for the clarification.. onSubmit is not a common tag?? hmmm, sorry, i am really new to scripting, and those are the refs that i found which work, what I am trying to do though is, for the "Coverage & Limit Information" section of the form, under the "Limits Required" required section, there are 4 amount boxes, what I want, and cannot get to work to save my life, is for the first 3 amount sections:

General Liability
Auto Liability
Garage Liability

I want the user to be able to enter an amount up to but NOT over $1,000,000.00, if they enter a value over $1M, they will be alerted that they need to choose and option either $1M or under, or call the service center, I would prefer that these alerts are called when they submit the form, hence the onSubmit calls, but, its just not working for me.
 
the 4th option has the same restraints, but the limit is $100M and under.

I tested your code, and it does just what mine does, enter an amount, and nada happens... any thoughts???

0
 
LVL 2

Expert Comment

by:thor918
ID: 6949150
okey.. strange that the code I posted didn't work for you.. What are your browser name and version?

Is the amount of General Liability,Auto Liability,Garage Liability,Excess Liability only going to be validated if the checkbox is selected?
0
 
LVL 2

Expert Comment

by:thor918
ID: 6949151
Is the amount of General Liability,Auto Liability,Garage Liability,Excess Liability only going to be
validated if the checkbox next to it is selected?
0
 
LVL 5

Author Comment

by:nfroio
ID: 6949168
I had not thought about that, but, no that is not necessary, part of the script that I had working on standalone, also alerts if they left either amount sections blank, so, some total needs to be entered.

here is the stand-alone version, that was working fine, but, incorporating into the form, it craps out on me..

FYI - Browser is Internet Explorer 5.00.2920.0000 - scripting is allowed.

              ================================

<HTML>
<HEAD>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
function valid(form) {
  var field = form.Amount;  
  var userAmount = parseInt(field.value);  
  if (!userAmount) {
    alert("You must input a desired coverage limit.");
    return false;
  } else if (userAmount <= 1000000) {  
      alert("Thank you.");  
      return true;
    } else {
        alert("Limits for this type of coverage are $1,000,000.00, please enter a desired coverage limit that is $1,000,000.00 or under. If you require limits of more than $1,000,000.00, please call the Los Angeles CSBU Client Connection hotline at (866) 283-7123 for assistance with your request.");
        field.focus();
        field.select();
        return false;
      }
}
// -->
</SCRIPT>


<FORM METHOD="POST"
      ACTION="mailto:you@yourdomain.com"
      ENCTYPE="text/plain"
      onSubmit="return valid(this)">
Your Amount:<BR><INPUT TYPE="text" NAME="Amount" SIZE="20"><BR>

<INPUT TYPE="submit" VALUE="Send">
</FORM>
</BODY>
</HTML>
 
   ==============================================

The only problem / difference that i see that stands out which may cause the problem is the <form> tag placements..

thanks,

nfroio

0
 
LVL 2

Expert Comment

by:thor918
ID: 6949773
that code is working fine by me.. the only thing is that you have the alert on multiple lines.. and this caused a problem with me.. you could have the whole alert in one line or do this :

<HTML>
<HEAD>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
function valid(form) {
 var field = form.Amount;  
 var userAmount = parseInt(field.value);  
 
 if (!userAmount) {
   alert("You must input a desired coverage limit.");
   return false;
 } else if (userAmount <= 1000000) {  
     alert("Thank you.");  
     return true;
   } else {
       alert("Limits for this type of coverage are $1,000,000.00, please enter a desired coverage"+
      +"limit that is $1,000,000.00 or under. If you require limits of more than $1,000,000.00, please"+
      +"call the Los Angeles CSBU Client Connection hotline at (866) 283-7123 for assistance with your request.");
       field.focus();
       field.select();
       return false;
     }
}

// -->
</SCRIPT>


<FORM METHOD="POST"
     ACTION="mailto:name@yourdomain.com"
     ENCTYPE="text/plain"
     onSubmit="return valid(this)">
Your Amount:<BR><INPUT TYPE="text" NAME="Amount" SIZE="20"><BR>

<INPUT TYPE="submit" VALUE="Send">
</FORM>
</BODY>
</HTML>
0
 
LVL 2

Expert Comment

by:thor918
ID: 6949776
your
request.");  on the same line as "your" to.. IT was damage when I posted..
0
 
LVL 5

Author Comment

by:nfroio
ID: 6951316
hello all,

well, the solution has been found, and here is the finished product, sadly, no one here was able to give me a workable solution, so I will be asking CS to drop to zero and PAQ this...

http://www.geocities.com/nfroio/liab_certform_validate.html

0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 6951755
As reuqested, will Place question in PAQ.

Thanks,
ComTech
CS Admin @ EE
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Multiflying 2 Input Text On a Table 7 31
how can i make 2 columns? 4 41
html input 8 43
Explain this javascript function to me 2 29
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question