Results 1 to 6 of 6

Thread: need some help

  1. #1
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy need some help

    okay,

    I'm looking to create a text box that populates from file names in a selected folder.....

    For instance,
    I have a folder that has shortcuts to network folders.

    And i need to display these links on a html page.. wich works great, but because i have thousands of these shortcuts it would be a huge work load to add these folders manualy to the page..

    So i was wondering if there maybe a applet that can do this. so basicly the html page would just display the content of that folder....maybe a dynamic text box ??

    any help on this would be greatfull

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Is this on your computer? If so, this would work:

    Code:
    <html>
    <head>
    <title>Dir Display - Demo</title>
    </head>
    <body>
    <iframe src="//c:/networkshortcuts/" width="100%" height="100%" scrolling="auto" frameborder="0"></iframe>
    </body>
    </html>
    Just substitute the path to the folder you want displayed. Even if the directory isn't on your computer, many servers will display the contents of a directory if its absolute url is inserted above where I have //c:/networkshortcuts/ - IF there is no file in that directory that takes precedence like a file named index.html would.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you

    Thank you so much for the info…
    I do have a problem when using this tag.
    Using this displays the entire folder content, meaning it also displays the folder properties on the left side


    If I change the folder views from “Show common tasks in folders” to “Use windows classic folders”
    It does go away, however it’s only to my PC. When another user on a PC has the Show common tasks in folders “ selected they have the same problem , seeing the tasks menue…




    So is there a way to not show this at all?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This is only an issue in IE on a windows based computer showing a local (and possibly a windows based networked) directory. Using another browser will eliminate this, as will using IE but, displaying a directory on a system that doesn't use windows, like the internet. Locally however, IE uses the directory settings generally in force for listing directories. If the particular computer is using the most common system defaults, this code will do what you want on most windows systems:

    HTML Code:
    <html>
    <head>
    <title>Dir Display - Demo</title>
    </head>
    <body style="overflow:hidden">
    
    <iframe style="position:absolute;top:0;left:-198px;" src="//c:/networkshortcuts/" width="122%" height="100%" scrolling="auto" frameborder="0"></iframe>
    
    </body>
    </html>
    However, I would recommend against it as there are so many ifs involved and, it will mess things up under many other circumstances. Besides, is it so bad to see the common tasks?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I got to thinking (first mistake) 'there must be a way to make this more widely applicable'. I came up with this set of scripts that should behave pretty well no matter the browser (as long as it supports iframes) and as long as the two variables at the top are correctly set.

    HTML Code:
    <html>
    <head>
    <title>Dir Display - Demo</title>
    </head>
    <script type="text/javascript">
    ///////////////////////////////
    //Directory Display Script
    //Copyright © John Davenport Scheuer
    //Permission to use granted
    //This credit must remain
    ///////////////////////////////
    
    //Set Use - 
    //ielocal for viewing a directory that will display in Windows default explorer mode
    //other for all others
    var Use = 'ielocal';
    
    //Set Directory to be displayed
    var dir = '//c:/networkshortcuts/'
    
    //////////////No Need to Edit Below Here/////////////
    var ie4 = (document.all) ? 1 : 0;
    var ns6 = (document.getElementById && !document.all) ? 1 : 0;
    if ((typeof(window.onresize))==('object')||('undefined'))
    window.onresize=refresh;
    function refresh() {
    setTimeout("doit()",1)
    }
    function doit(){
    if (window.location.reload)
    window.location.reload( true );
    else if (window.location.replace)
    window.location.replace(unescape(location.href))
    else
    window.location.href=unescape(location.href)
    }
    </script>
    <body style="overflow:hidden">
    <script type="text/javascript">
    if (ns6||ie4){
    function winWid(){ return (ns6) ? window.innerWidth:document.body.clientWidth; }
    var width=winWid();
    var left=0;
    if(ie4&&(Use=='ielocal')){
    width+=210;
    left-=210;
    }
    document.write('<iframe style="position:absolute;top:0;left:'+left+'px;" src="'+dir+'" width="'+width+'" height="100%" scrolling="auto" frameborder="0">Unsupported Browser</iframe>')
    }
    else
    document.write('Unsupported Browser')
    </script>
    </body>
    </html>
    Last edited by jscheuer1; 05-14-2005 at 04:28 AM. Reason: Fix for FF's treatment of 'onresize'
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank You

    Thank you so much for the help on this .....
    it works great.......

    you guys are the best

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •