Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Errors

Status
Not open for further replies.

Tracy3e

Technical User
Jun 23, 2001
54
CA
I am receiving this error:

Object doesn't support this property or method: 'frm1.submit'

Here is a copy of my code:

<html>
<head>
<script language=&quot;vbscript&quot;>
dim frm1

sub window_OnLoad
set frm1 = document.form1
end sub

sub updateTrading_OnClick
'check if year is numeric
set ChkYear = frm1.YearDate1

if chkYear <> &quot;&quot; then
if not IsFieldNumeric(ChkYear) then
exit sub
end if
end if

'submit the form
frm1.submit
end sub


function IsFieldNumeric(field)

if not isnumeric(field.value) then
alert &quot;Year field must be numeric&quot;
field.focus
IsFieldNumeric = false
else
IsFieldNumeric = true
end if

end function

</script>
</head>


<form action=&quot;TradingPrivU.asp&quot; method=&quot;POST&quot; id=&quot;form1&quot; name=&quot;form1&quot;>

<input name=YearDate1 size=4 maxlength=4 type=text>

<INPUT type=&quot;button&quot; name=&quot;updateTrading&quot; value=&quot;Update&quot;>



I receive this error when I click the button. The error happens when it is trying to submit the form to the server. The wierd thing about this is that I get a similar error when I use JavaScript. It does not like to submit! Can you please help me? Any help would be gratly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top