Dtonlinegames Posted April 6, 2009 Share Posted April 6, 2009 Hi guys, I'm trying to return a list of names for the folders I'm browsing for some software I'm programming but I keep getting an object doesnt support this property or method error when I try to substr or split the value ListItem. I'm not so bad with Javascript but I think I'm missing something here lol I use split and substr all the time. Cheers guys function TrigoldListener(stage,casEID){ Promptxt='<p id="loading" class="big_black_text">Loading</p>'; document.write(Promptxt); if(stage==1){ //var ListItem =new Array(); Promptxt='<p id="waiting" class="big_black_text">Waiting..</p>'; document.write(Promptxt); document.getElementById('loading').style.display ='none'; CaseFolder =new ActiveXObject("Scripting.FileSystemObject"); Cf =CaseFolder.GetFolder("Somewhere on the hard drive"); CaseList=new Enumerator(Cf.SubFolders); lcr ='<table width="50%" align="center">'; lcr +='<tr><td width="50%">Case ID:</td><td width="50%">Upload To:</td></tr>'; while(!CaseList.atEnd()){ ListItem =CaseList.item().substr(43); lcr +='<tr><td width="50%">'+ListItem+'</td><td width="50%"><input type="button" value="Upload" onclick"return TrigoldListener(2,"300");" /></tr>'; CaseList.moveNext(); }//while lcr +='</table>'; return lcr; }//if stage 1 else if(stage==2){ document.getElementById('waiting').style.display ='none'; document.getElementById('loading').style.display ='block'; //stageone =setInterval(FileLister,5000); }//if stage 2 else if(stage==3){ clearInterval(); document.getElementById('importFileList').innerHTML='<p class="big_black_text">Step 2</p>'; }//else if stage 3 } Link to comment https://forums.phpfreaks.com/topic/152778-javascript-and-vb-problem-object-not-supported-stuff/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.