Hi, I'm having some trouble getting a function call within an onCLick action of a Form button working. The contents of the function must be defined as vbScript as per the example below.
Does anyone have any idea why it won't recognize my function?
Thanks in advance.
Zycmi
---------Code follows----------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="temp2.asp" method="post">
<input name="submit" type="submit" onClick="<%fncDoThis()%>" value="submit">
</form>
<script language="vbscript">
Private Function fncDoThis()
Msgbox ("Hello"
end Function
</script>
</body>
</html>
---------Error Message Follows-------
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'fncDoThis'
/sudbury/site/org/forms/media/temp/temp.asp, line 10
Does anyone have any idea why it won't recognize my function?
Thanks in advance.
Zycmi
---------Code follows----------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="temp2.asp" method="post">
<input name="submit" type="submit" onClick="<%fncDoThis()%>" value="submit">
</form>
<script language="vbscript">
Private Function fncDoThis()
Msgbox ("Hello"
end Function
</script>
</body>
</html>
---------Error Message Follows-------
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'fncDoThis'
/sudbury/site/org/forms/media/temp/temp.asp, line 10