M
mike w.
I have the following code in my asp project.
In Test.lpk i added MS Common Dialoag
but i always get an error
"Object required: "Common Dialog1"
so CommonDialog1 isn't being created.
What am i doing wrong?
thanks,
mike
<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="Test.lpk">
</OBJECT>
<OBJECT ID="CommonDialog1" WIDTH=32 HEIGHT=32
CLASSID="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB"
codebase="http://activex.microsoft.com/controls/vb6/comdlg32.cab"
VIEWASTEXT>
<PARAM NAME="CancelError" VALUE="1">
<PARAM NAME="DialogTitle" VALUE="Select Data File">
<PARAM NAME="Filter" VALUE="Level Data Files (*.lvl)|*.lvl|All
Files (*.*)|*.*">
</OBJECT>
<A HREF="javascript: LoadFile(location.pathname.substr(1));">
Load Data File1</A>
<SCRIPT LANGUAGE="VBScript">
Sub LoadFile(GameDir)
On Error Resume Next
CommonDialog1.InitDir=GameDir
CommonDialog1.ShowOpen
If Err.Number=32755 Then
Err.Clear
On Error Goto 0 ' Restore Default Error Handler
Exit Sub
End If
On Error Goto 0
MsgBox "You chose " & CommonDialog1.FileTitle
End Sub
</SCRIPT>
In Test.lpk i added MS Common Dialoag
but i always get an error
"Object required: "Common Dialog1"
so CommonDialog1 isn't being created.
What am i doing wrong?
thanks,
mike
<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="Test.lpk">
</OBJECT>
<OBJECT ID="CommonDialog1" WIDTH=32 HEIGHT=32
CLASSID="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB"
codebase="http://activex.microsoft.com/controls/vb6/comdlg32.cab"
VIEWASTEXT>
<PARAM NAME="CancelError" VALUE="1">
<PARAM NAME="DialogTitle" VALUE="Select Data File">
<PARAM NAME="Filter" VALUE="Level Data Files (*.lvl)|*.lvl|All
Files (*.*)|*.*">
</OBJECT>
<A HREF="javascript: LoadFile(location.pathname.substr(1));">
Load Data File1</A>
<SCRIPT LANGUAGE="VBScript">
Sub LoadFile(GameDir)
On Error Resume Next
CommonDialog1.InitDir=GameDir
CommonDialog1.ShowOpen
If Err.Number=32755 Then
Err.Clear
On Error Goto 0 ' Restore Default Error Handler
Exit Sub
End If
On Error Goto 0
MsgBox "You chose " & CommonDialog1.FileTitle
End Sub
</SCRIPT>