Common Dialog1 created problem

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>
 
M

Mark Schupp

You'll need to check a client-side group for that.

If you are truly trying to create it server-side, you cannot. The web-server
does not support and user interface objects (because it is running as
service with no user interface, or user for that matter).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top