FancyPrairie
Programmer
I created a .cls file and included it in my html page like this (for our intranet site not our internet site):
<SCRIPT language=vbscript src="../My_Library/My_Class.cls">
</SCRIPT>
The class is initialized like this:
All is well as long as i open the page like this:
\\servername\path\My_Page.htm
However, it fails when I open the page like this:
My vbscript within the html page declares my class like this:
Dim AD
Set AD = New clsMy_Class
I receive the error "variable undefined clsMy_Class" upon executing the set statement.
Consequently, I don't understand why launching in IE using a syntax like this (\\sever\path...) works and launching it like this ( doesn't.
Can someone explain the syntax I should be using to include the class file so it works either way? I hate to hard code the full path because I will have to remember to change it when I move the code from our test site to our live site.
<SCRIPT language=vbscript src="../My_Library/My_Class.cls">
</SCRIPT>
The class is initialized like this:
Code:
Private Sub Class_Initialize()
Set mobjRootDSE = GetObject("LDAP://rootDSE") ' bind to the rootDSE for portability
End Sub
All is well as long as i open the page like this:
\\servername\path\My_Page.htm
However, it fails when I open the page like this:
My vbscript within the html page declares my class like this:
Dim AD
Set AD = New clsMy_Class
I receive the error "variable undefined clsMy_Class" upon executing the set statement.
Consequently, I don't understand why launching in IE using a syntax like this (\\sever\path...) works and launching it like this ( doesn't.
Can someone explain the syntax I should be using to include the class file so it works either way? I hate to hard code the full path because I will have to remember to change it when I move the code from our test site to our live site.