I am having a problem with an ASP page I am trying to write. When I try to execute <body onload="ready_it">, I get this error:
Microsoft VBScript runtime error: Type mismatch: 'ready_it' was not handled.
I do not get the error if I remove the 'runat=server', but I need that to create a object from a DLL registered on the server.
I am thoroughly confused. Any help would be appreciated. A code snippet of what I am trying to do is below.
Thanks, Johnny
<%@ Language=VBScript %>
<% Option Explicit %>
<% Response.Buffer = True %>
<% Response.Clear %>
<% Response.Expires = 0
Server.ScriptTimeout = 300 %>
<% Response.AddHeader "cache-control", "private" %>
<% Response.AddHeader "pragma", "no-cache" %>
<html>
<head>
<title>Estimator</title>
<script language="vbscript" runat=server>
<!--
SUB ready_it()
NPGrossIncome.value = 0
CPGrossIncome.value = 0
NPFedTax.value = 0
CPFedTax.value = 0
NPNetIncome.value = 0
CPNetIncome.value = 0
GuidelineAmountOfSupport.value = 0
Set objLookup = Server.CreateObject("MyDLL.Lookup")
END SUB
-->
</script>
</head>
<body onLoad="ready_it()" language="vbscript">
</body>
</html>
Microsoft VBScript runtime error: Type mismatch: 'ready_it' was not handled.
I do not get the error if I remove the 'runat=server', but I need that to create a object from a DLL registered on the server.
I am thoroughly confused. Any help would be appreciated. A code snippet of what I am trying to do is below.
Thanks, Johnny
<%@ Language=VBScript %>
<% Option Explicit %>
<% Response.Buffer = True %>
<% Response.Clear %>
<% Response.Expires = 0
Server.ScriptTimeout = 300 %>
<% Response.AddHeader "cache-control", "private" %>
<% Response.AddHeader "pragma", "no-cache" %>
<html>
<head>
<title>Estimator</title>
<script language="vbscript" runat=server>
<!--
SUB ready_it()
NPGrossIncome.value = 0
CPGrossIncome.value = 0
NPFedTax.value = 0
CPFedTax.value = 0
NPNetIncome.value = 0
CPNetIncome.value = 0
GuidelineAmountOfSupport.value = 0
Set objLookup = Server.CreateObject("MyDLL.Lookup")
END SUB
-->
</script>
</head>
<body onLoad="ready_it()" language="vbscript">
</body>
</html>