index | search | no replies | posting guidelines | help login | register
Index » General » Site & Forum Feedback
search this forum:
:: TreeView Error -Variable is undefined: 'strFolder' :: (6)Post a New Message | Post a Reply
Mar 8 2006, 8:28 AM
 TreeView Error -Variable is undefined: 'strFolder'Post a Reply
 KevMull

View this author's profile Send this author a private message

since: Jan 18, 2006
from: UK

I keep getting this error...Variable is undefined: 'strFolder'  from the 'clsTreeView.asp' file.

Can anyone please help?

Many Thanks

Mar 8 2006, 8:46 AM
 Re: TreeView Error -Variable is undefined: 'str...Post a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

This error seems to be coming from your asp file. make sure you have declared all your variables or remove the Option Explicit tag line at the top of the clsTreeView.asp




-------------------------
Ghost
Mar 8 2006, 8:53 AM
 Re: TreeView Error -Variable is undefined: 'str...Post a Reply
 KevMull

View this author's profile Send this author a private message

since: Jan 18, 2006
from: UK

Many thanks for your reply.  

Removing 'option explicit' seems to have worked.

Also, do you know why the files are being shown as text and not hyperlinks?

I am using the explorer.asp file.
I can't seem to find any other file that will show a directory structure.

Here is the link....

http://www.eeetestw.man.ac.uk/treeviewdemo2/explorer.asp

Many Thanks


Mar 8 2006, 9:06 AM
 Re: TreeView Error -Variable is undefined: 'str...Post a Reply
 whichman

View this author's profile Send this author a private message Visit author's homepage

from: Laurel, MD

The code below will work if you also have the image folders that come with the download. Try this file myexplorer.asp

<!--#include file= "clsTreeView.asp"-->
<%
'declare and set your folder path
  Dim strFolder
strFolder = "C:\InetPub\wwwroot"
  
'declare your treeview object
  Dim objTV
  
'create an instance of your treeview
  Set objTV =  New TreeView
  
'set the treeview properties
objTV.ImagesFolder = "images_xp"
  
'display contents
  Call objTV.DisplayFolderContents(strFolder)
  
'clear memory
  Set objTV =  Nothing
  
%>


P/S: Remember that you can always update the sub routine ListFolderContents(objFolder,Parent) to hide some files and folders you want.



-------------------------
Master of the Game
Mar 8 2006, 9:30 AM
 Re: TreeView Error -Variable is undefined: 'str...Post a Reply
 KevMull

View this author's profile Send this author a private message

since: Jan 18, 2006
from: UK

whichman, thanks very much, the images work fine.

But ....still no clickable links on the acutal folder contents and also the '+' icon doesn't seem to exapsnd the folder bit the folder name itself does.

See my link above

Mar 8 2006, 10:02 AM
 Re: TreeView Error -Variable is undefined: 'str...Post a Reply
 whichman

View this author's profile Send this author a private message Visit author's homepage

from: Laurel, MD

This is because the clsTreeView object is based on CSS and the images are actually background images.


-------------------------
Master of the Game
Pages: (1)   [1]

search this forum: