Re: Error Object doesn't support this property or method
- From: "Joe Earnest" <jearnest3-SPAM@xxxxxxxxxxxxx>
- Date: Wed, 18 May 2005 10:43:13 -0600
Hi,
"Mike L" <Cadel@xxxxxxxxxxxxx> wrote in message
news:717A724D-068F-4F37-A9BE-22165D1EFF4B@xxxxxxxxxxxxxxxx
>
> When I click on the submit button I get the error message, "Object doesn't
> support this property or method". I want a Yes No Message Box to pop up
> on
> click of the submit button. If the user clicks on NO then cancel submit if
> user clicks on YES then continue submit.
>
> <html>
> <head>
>
> <title>test</title>
> <script type="text/vbscript">
> Function MakeMsgBox()
> if MsgBox("Test",vbyesno,"Legacy Permit") then
> MakeMsgBox = True
> else
> MakeMsgBox = False
> End if
> End Function
> </script>
> </head>
>
> <body>
> <form name="OnlineSales2" action="OnlineSales3.asp" method="post"
> onSubmit="MakeMsgBox">
>
> <input type="submit" value="Continue">
>
> </form>
> </body>
> </html>
>
This is not a script issue. Your script works fine as local client-side
html (see below). Check your form submit.
-----
<html>
<head>
<title>test</title>
<script type="text/vbscript">
Function MakeMsgBox()
if MsgBox("Test",vbyesno,"Legacy Permit") then
MakeMsgBox = True
else
MakeMsgBox = False
End if
End Function
</script>
</head>
<body>
<button onClick="makeMsgBox">Test Button</button>
</body>
</html>
-----
BTW, you can shorten
> if MsgBox("Test",vbyesno,"Legacy Permit") then
> MakeMsgBox = True
> else
> MakeMsgBox = False
> End if
to
MakeMsgBox = _
(MsgBox("Test",vbyesno,"Legacy Permit")=vbYes)
Joe Earnest
.
- Follow-Ups:
- Re: Error Object doesn't support this property or method
- From: Joe Earnest
- Re: Error Object doesn't support this property or method
- References:
- Error Object doesn't support this property or method
- From: Mike L
- Error Object doesn't support this property or method
- Prev by Date: RE: Finding systems by OS
- Next by Date: How come my label is not showing when I set visible property to tr
- Previous by thread: Error Object doesn't support this property or method
- Next by thread: Re: Error Object doesn't support this property or method
- Index(es):