Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2006, 04:50 AM
Registered User
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default TREE-view disply problem

i am having the problem with disply the out put i am using iframe so it is fixed length either i am getting free spaces or some out put is missing please hlep me to view the out put correctly.
i have no choice so i used iframes
to run this script place this code in any wwwroot folder ,replace the getf="Editor" to any folder in wwwroot and run the script

<script language="JavaScript">
function Show_Stuff(Click_Menu)
{
if (Click_Menu.style.display == "none")
{
Click_Menu.style.display = "";
}
else
{
Click_Menu.style.display = "none";
}
}
</script>
<%
function getfolders(basefol,prev)
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject ")
set fo=fs.GetFolder(server.MapPath(basefol))
for each x in fo.SubFolders
if len(trim(x))<>0 then
if prev="" then
i=i+1
nof(i)=nooffiles
nooffiles=0
end if
dim fs1,fo1,x1
set fs1=Server.CreateObject("Scripting.FileSystemObjec t")
set fo1=fs1.GetFolder(server.MapPath(basefol+"\"+x.nam e))
for each x1 in fo1.files
nooffiles= nooffiles+1
next
set fo1=nothing
set fs1=nothing
if prev="" then
folderarr(i)=basefol+"\"+x.name
fol(i)=x.name
end if
getfolders basefol+"\"+x.name,basefol
end if
next
set fo=nothing
set fs=nothing
end function%>
<%
if len(trim(request.QueryString("getf")))=0 then
getf="Editor"
else
getf=trim(request.QueryString("getf"))
end if
dim nof(9999),folderarr(9999),fol(9999)
i=-1
nooffiles=0
getfolders getf,""
nof(i+1)=nooffiles
for a = 0 to i
response.write "<table><tr><td><DIV><a href=javascript:Show_Stuff("+replace(cstr(folderar r(a)),"\","")+")>+</a></DIV></td><td><a target='_top' href='articles.asp?view="+server.URLEncode(cstr(fo lderarr(a)))+"'>"+cstr(fol(a))+" ["+cstr(nof(a+1))+"]<a></td><tr></table>"
getf=cstr(folderarr(a))
%><span ID="<%=replace(cstr(folderarr(a)),"\","")%>" style="display: none"><table><tr><td width=200 wrap><iframe height="300" width="300" src="?getf=<%=getf%>" marginheight="0" frameborder="0" scrolling="no"></iframe></td></tr></table></span>
<%next %>







Similar Threads
Thread Thread Starter Forum Replies Last Post
Tree View dotnetDeveloper ASP.NET 3.5 Basics 1 November 26th, 2008 05:05 PM
Tree View mistry_bhavin ASP.NET 1.x and 2.0 Application Design 1 August 3rd, 2005 03:58 PM
help me on tree view gps_giri_p General .NET 0 December 13th, 2004 10:36 AM
tree view msrnivas .NET Web Services 0 February 23rd, 2004 07:04 AM
Tree View Natalie Pro VB 6 5 September 23rd, 2003 07:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.