Jump to content

Javascript and VB problem (object not supported stuff)


Dtonlinegames

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.