Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I call an object from an ASP page? 1

Status
Not open for further replies.

scc

Programmer
Joined
Apr 30, 2001
Messages
218
Location
US
I need to call an ActiveX object from my ASP page running Javascript client side. Can this be done? If so how would I go about doing this? Code would be helpful.

I can do it using VBScript, but those hitting my page may not use IE, so I need to do it with Javascript.

TIA
 
here u go... the following piece of code creates an instance of the File System Object!
It would then display the different folders in your C drive...

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
var fso, f, fc, s, szFilePath, bFileExists;
fso = new ActiveXObject(&quot;Scripting.FileSystemObject&quot;);
f = fso.GetFolder ( &quot;C:\\&quot; );
fc = new Enumerator( f.SubFolders );
if ( !fc.atEnd() )
{
for (; !fc.atEnd(); fc.moveNext())
{
alert(fc.item())
}
}
//-->
</SCRIPT>

yeah? Sham aka boolean... be practical/be straight... true/false?!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top