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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

object doesn't support property or method at the submit line.

Status
Not open for further replies.

svsuthar1

Programmer
Jul 6, 2004
135
US
I am getting this on my vbscript, javascript code below.. please advise.

<Script language="javascript">
function ShowDate(oDoc,cDate)
{
window.open("/includes/datepicker.asp?backf="+oDoc+"&cDate="+cDate,"window", "height=210, width=300, resizeable=no,","");
}

function resubmit()
{
document.forms[0].NavBox.value
}
</SCRIPT>
<%Lanugage=VBScript%>
<SCRIPT LANGUAGE = "vbscript">
function Validate()
Dim pass
pass=true
If (((getExternal_Errors.item("Resolution").value)="") OR (Not(IsNumeric(getExternal_Errors.item("Resolution").value)))) Then
MsgBox "Resolution # is required field and must be Numeric",vbInformation,"Resolution #"
getExternal_Errors.Resolution.focus
pass=false
ElseIf (getExternal_Errors.item("ReturnDate").value)="" Then
MsgBox "Return Date is required field",vbInformation,"Return Date"
getExternal_Errors.ReturnDate.focus
pass=false
End If
Validate=pass
If Validate then
'document.getExternal_Errors.submit
document.getExternal_Errors.Submit
End If
End function
</SCRIPT>
 
Hello svsuthar1,

[1] Is there any special purpose for the <%Lan[red]gu[/red]age = "vbscript"%> besides the typo? Make sure the function is seen client-side.

[2] What is Validate=pass? what is pass? If you use "if Validate then", then I would guess it is a boolean? Make sure it is a true there.

Otherwise, document.formname.submit is a valid method.

regards - tsuji
 
Further note:

OK, I see the pass! Neglect [2]

- tsuji
 
Thanks tsuji,

I know that's the right code, but still it gives me that message. I guess since I have javascript and vbscript mixed.

How can i fix the problem.

Samir
 
Have you tried to replace this:
If Validate then
By this ?
If pass Then
Just to avoid unwanted recursion

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks all,

I found out that it didn't like the Name property on a button. I wanted that Name property so it could have a focus set on it... but I am Ok with it.

Samir

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top