..


Sponsored Links

IsObject

IsObject function, Boolean, returns true if the value passatole as a parameter is an object (object) and False if it is not.

The syntax is as follows:

 



 document.write (IsObject ("Luke"))

 
Returns False because "Luke" is a string and not an object.






 Dim King







 re = New RegExp







 document.write (IsObject (obj))



Returns True on the basis of the fact that the test, for example, is done on an instance of the RegExp object.

The "IsObject" is frequently used with ASP to verify that a given value whether or not an object, then perform different routines depending on the result, as in the following:





 <%







 Dim fso







 Set fso = Server.CreateObject ("Scripting.FileSystemObject")







 If IsObject (fso) = False Then



   



 Response.Write "It 'an object'







 Else



   



 Response.Write "This is not an object"







 End If







 Set fso = Nothing







 %>



Returns 'And' an object. "

I invite you to testarec with other objects such as ADO, XMLDOM, XMLHTTP, MSWC order to verify its efficiency.

In the same category ...
E-Learning
ASP Zero (Ebook) ASP Zero (Ebook)
Learning Microsoft ASP and VBScript from scratch. At only 29 €.
Visual Basic 6 (Course) Visual Basic 6 (Course)
Make Desktop Applications with VB6. From 39 €.
Sponsored Links