HTML - How To Display A File Directory In Html
I am new to writing html and have really had a tough time trying to find any info on how to do this. I want to have a folder with word/powerpoint documents in it and a list of download links to those documents viewable inside a div on a webpage. I want the list to be able to display whatever is in the folder so that it will update as the contents of the folder are updated. how would I go about doing this?
Similar Tutorialsok people this is what i'm trying to do i have html.. calls cgi ..(using python).. through cgi i wanna be able to display a file back on html this is what i'm trying print '''<button type="button" onclick='window.location.href="file.txt"'>new</button>''' so basically on click i want it to display contentts of file.txt.. just not happening path and all is correct another thing.. without cgi.. just in windows and notepad this works fine.. i feel it can't be a cgi problem as other variables and all are getting printed fine through cgi back on html thanks in advance for your help Hi All, Please Heeeeeeeeeeeeeeeeeeeeeeeeeeeellllllppp!!!!! Thanks in advanced!!! Have a few mistakes and / or something is missing below: Code: <html> <head>PLEASE FIND THE MISTAKE(S) or SOMETHING MISSING /</head> <script type="text/javascript"> window.onload=function() { document.getElementById('exampleletterList').onchange=function() { window.location=('http://www.example.org/'+this.value+''); } } </script> <body> <select id="exampleletterList"> <a target=\"_blank\" href=\"file.doc\" title=\"\">John Doe<br> XXXXXXXXXXX</br></a>. <option value=""><b> PLEASE SELECT THE FOLLOWING: <b/> </option><!--this option takes you to --> <body mar="0" marginheight="0" bgcolor="rgb(38,38,38)"> "BACKGROUND BLUE GREEN MARMOL " <embed width="100%" height="100%" name="plugin" src="http://www.example.pdf" type="application/pdf"> <br> <CENTER> <option value=index.htm>Option #1</option><!--this option takes you to --> <option value="example7">Option #2</option><!--this option takes you to --> <option value="example3">Option #3 </option><!--this option takes you to --> <option value="example4"><br>Option #4</br></option><!--this option takes you to --> <option value="example5">Option #5</option><!--this option takes you to --> <option value="example2">Option #6</option><!--this option takes you to --> <option value="blog/wp-login.php"><!--this option takes you to blog--> </select> </CENTER> </br> </body> <html xmlns:v="urn:schemas-microsoft-com:vml" xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz </body> </head> </html> HTLM code to display a directory listing??? Hi there, I wonder whether anyone can help me, I am been desperately searchnig for this answer. Is there any HTML code I can use which I can insert into a webpage, that will show me the directory contents of a particular directory thats within the webserver? I have a webserver which contains a list of files, which I can browse to and view ONLY if I insert the location into a web broswer such as: http://webserver/mydocuments/ I have files that are regularly copied into this directory on my webserver, I want to keep watch on this folder everytime a new file is added. The only way I can do this now is to type in the URL HTTP://webserver/mydocuments and then keep hitting the REFRESH button on IE. Is there a way where the page will keep refreshing every minute/seconds to enable me to keep watch on added files into this location? I thought that if there is some HTML code I can insert into a say a index.html file to allow me to view directory contents, I can then insert code to keep refreshing that page. Any help with this will be appreciated. I thankyou for your help and ideas. Yours, Jameera I am trying to write an .htaccess file that accomplishes three things, but I can't get them to happen all at once. Do I have something out of order? (the file is not active right now) I am trying to: 1) redirect all non-www to www (for the root directory main site) 2) redirect two specific pages to new pages and retain the link juice 3) not redirect two subdirectories that have other domains pointed to them (www.bigcountryacres.info points to the first and www.kidslovedrbarton.com points to the 2nd) The following code almost works. The two old .htm pages on the main site are redirected to their .html versions just fine. When going to a subdirectory, you can reach the index page the first time. Then if you link to a subpage and then go back to the home page link (just index.htm), it gets redirected to my main site instead. Any idea of what I'm doing wrong? Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI} !^/_BigCountryAcres/ RewriteCond %{REQUEST_URI} !^/_DrBarton/ RewriteCond %{HTTP_HOST} ^integritivity.com [NC] RewriteRule ^(.*)$ http://www.integritivity.com/$1 [L,R=301] redirect 301 /WebDesign.htm http://www.integritivity.com/WebDesign.html redirect 301 /index.htm http://www.integritivity.com/index.html Thanks, Robin hi everybody, I am working in a html. I defined a functiion in a html file.(first.html) I want to call that function in another html file.(second.html) How can i call that function in second.html file? give some sample code Thanks in advance.... Hi, Can any one explain me whether its possible to insert an HTML code for all the pages in a directory with out modifying all the files. eg. Execute external file automatically with all the pages Thanks Dear Members, i am new to this forum. now i plan to develop a topic based directory and i want the all the product links and company names should be simple HTML file and at the same i wanted to be searchable, reorderable and etc.. i dont know how to do that and what technology to use and at the same time i seen some sites ( Example www.monsterindia.com , www.alibaba.com ) done the same thing can any one help / guide me exploring the technology Thanks in advance Hi, I've decided to use subdirectories and index.html files to present my all my web pages (www.website.com/about, with a index.html file within the about folder). But I am finding it difficult to view my website locally when editing, as I open it in either firefox, safari, opera and every time time I hit a link it doesn't direct me to the index.html file, but instead shows me every file located within the directory. Is there anyway round this, as I am having to upload every page to view the changes I make to it. For example, do you know of any extensions or different web browsers that don't do this? Thanks, Matthew is there like a slick way to view a list of files in a ftp directory in html code? Hi, I'm trying to include one HTML file in another. I tried iframe and was displeased with the results, I want the size of the frame to change dynamically and not just scroll. Fair warning, my knowledge of JavaScript is non-existent >_> . Basically, I have a document written in HTML (please don't suggest a wholesale re-write, that's simply not practical) and the idea is to have one file where it makes sense to include it several times. One thing to mention, this document is not meant to be shown on a web-server, but in a browser while you're reading it off your hard-drive. Here's what I have so far. main.shtml Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>test</title> </head> <body> <center> <h1> This is only a test! </h1> </center> <p> Still testing!!!!! </p> <!-- #include file="included.html" --> <p> Even more testing!!!!! </p> </body> </html> included.html Code: <!--<html> <head> <title> asdfasdfasdfasd </title> </head> <body>--> <p> <h4> foobar </h4> <br> <br> <br> <br> <h4> boofar </h4> </p> <!--</body> </html>--> Not sure what I'm doing wrong, help appreciated! Hi, I am very, very new to XML and I am not able to get my .xsl data file to read into the table in my .xsl file. Thank you, kriscann how do i put up a file for download on a homepage? The audio files I use on my web page display the individual control (play stop pause buttons) windows on my monitor screen and all the music segments play when actuated. However some users report that they get a distorted page and nothing works. I am using XP and Vista with IE7. Can anyone help find the cause of the problem? http://www.lvrny.net/theme.htm I have a website that needs to display a meeting day and location for a group meeting. The area this is displayed (and the format) is the same for each page of the site. Typing this into the code for each page whenever a location changes is a pain in the ass and I would like to just edit a text(or other simple format file) to have it call and display the text on all pages. I don't want to call up a whole page in a frame though. That looks terrible and the site is nice and sleek Thanks for the help! Hi ,I am new in html.Hope you can guide me step-by-step on this. I want to import my .txt file into the html form and the html form can add new item then to be add in to that particular .txt file too as well. can this be done? For example: (fruits.txt) 1.apple 2.banana 3.orange Can this fruit.txt be impoted to fruit.html page and show it at fruit.html page, at the same time, the fruit html page allow to add in new fruit, and once user add in new fruit, the fruit.txt file will be updated as well. Thanks for your guidiance and help. :-) I have a website where I want to make a drop down menu that will bring you to different pages. It is a very basic, sort of old-fashioned website that relies entirely on html. What I'm trying to do is make a drop-down menu that will be used as navigation for a section of a website and I want to have it in each internally linked page in that section, but I'm going to be adding more pages to it over time so I want to be able to put the drop-down menu code in a separate text file and then substitute it into the pages that I make that the options in the menu link to and then just edit the code in the text file when I add another page so that I don't have to go back and edit the code every single individual page whenever I add a new one among them. Basically all I'm asking is how I can put html code in a text file and then substitute that code into an html page by referring to the file. Thanks in advance for any help. I can get the example at Http://www.w3schools.com/xml/xml_data_island.asp to work just fine but when I try it with my own XML and HTML files it only displays a little white box. My XML: Code: <?xml version="1.0" standalone="yes" ?> - <IncrepDataset xmlns="http://tempuri.org/IncrepDataset.xsd"> - <Control> <Control_ID>0</Control_ID> <Name>DocViewer</Name> <Filename>docviewer.dll</Filename> <Icon>doc</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28546</Version> <TStamp>2006-11-06T18:00:09.4160070-06:00</TStamp> </Control> - <Control> <Control_ID>-1</Control_ID> <Name>RIDS</Name> <Filename>ridswrapper.dll</Filename> <Icon>tool</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:00:32.8518090-06:00</TStamp> </Control> - <Control> <Control_ID>-2</Control_ID> <Name>Explosives</Name> <Filename>atfwrapper.dll</Filename> <Icon>tool_bomb</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:01:01.2952610-06:00</TStamp> </Control> - <Control> <Control_ID>-3</Control_ID> <Name>ChecklistViewer.Bomb Response</Name> <Filename>checklistwrapper.dll</Filename> <Icon>tool_checklist</Icon> <IncrepLoadable>false</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:01:21.5461976-06:00</TStamp> </Control> - <DataType> <Datatype_id>1</Datatype_id> <name>String</name> <description /> </DataType> - <DataType> <Datatype_id>2</Datatype_id> <name>Decimal</name> <description /> </DataType> - <DataType> <Datatype_id>3</Datatype_id> <name>INT</name> <description /> </DataType> - <DataType> <Datatype_id>4</Datatype_id> <name>Boolean</name> <description /> </DataType> - <DataType> <Datatype_id>5</Datatype_id> <name>DateTime</name> <description /> </DataType> - <IncidentReport> <IncidentReport_ID>0</IncidentReport_ID> <Name>new</Name> <TStamp>2006-11-06T18:00:01.8344249-06:00</TStamp> <ProfileName>Bomb Response</ProfileName> <GUID>b2d785ca-98c2-47dd-9343-3714598d8f31</GUID> <License>24CC0LFL5T0K5D3944700DLRWYNU3R</License> <Version>4.0.0.26014</Version> </IncidentReport> My HTML: Code: <html> <body> <xml id="log" src="CurrentLog.xml"></xml> <table border="1" datasrc="#log"> <tr> <td><span datafld="Name"></span></td> <td><span datafld="Version"></span></td> </tr> </table> </body> </html> i'm a bit confused.. it always worked, that i uplaoded the hml code as a new web page in the ftp web tool... (without even name it to .html at the end of the site name...) How can I make that the webpage which i uploaded is diplayed as the actual webpage (and not shown the html code instead) WITHOUT have to add .html to the url??? Example: url.com/contact --> shows only html code url.com/contact.html --> shows correct site but if u access any site... you usually never have to add .html to the url: e.g.: www.mtv.com/music PLEASE, thanks So here's my problem: I had to create an HTML newsletter for a client to send on a monthly basis. I've tested it in several browsers and everything seemed to be working fine, until she received a reply from one of her subscribers, (from an AOL account) with a screenshot of what the newsletter looked liked on her screen. Everything was wrong! The newsletter didn't display pictures at all, some HTML comments were showing up and extra characters and no spaces had been placed between the text. I'm pretty new to HTML and CSS, so I tried to keep it as simple as possible to not compromise browser compatibility. And in different computers and browsers it was working perfectly fine. But now with this, I've no clue how to fix it! Help?? to view the source code: www.offinterarts.org/newsletter.html This is what I need: User opens HTML file---->data from XML file is displayed in order in HTML file This is my problem: User opens HTML file----> Only the heading "current log" and "tstamp" and "entry" are displayed I took the HTML and SXL from http://www.w3schools.com/xsl/xsl_client.asp HTML: Code: <html> <body> <script type="text/javascript">// Load XML var xml = new ActiveXObject("Microsoft.XMLDOM") xml.async = false xml.load("CurrentLog.xml")// Load XSL var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("CurrentLog.xsl")// Transform document.write(xml.transformNode(xsl)) </script> </body> </html> XML: Code: <?xml version="1.0" standalone="yes" ?> - <IncrepDataset xmlns="http://tempuri.org/IncrepDataset.xsd"> - <Control> <Control_ID>0</Control_ID> <Name>DocViewer</Name> <Filename>docviewer.dll</Filename> <Icon>doc</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28546</Version> <TStamp>2006-11-06T18:00:09.4160070-06:00</TStamp> </Control> - <Control> <Control_ID>-1</Control_ID> <Name>RIDS</Name> <Filename>ridswrapper.dll</Filename> <Icon>tool</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:00:32.8518090-06:00</TStamp> </Control> - <Control> <Control_ID>-2</Control_ID> <Name>Explosives</Name> <Filename>atfwrapper.dll</Filename> <Icon>tool_bomb</Icon> <IncrepLoadable>true</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:01:01.2952610-06:00</TStamp> </Control> - <Control> <Control_ID>-3</Control_ID> <Name>ChecklistViewer.Bomb Response</Name> <Filename>checklistwrapper.dll</Filename> <Icon>tool_checklist</Icon> <IncrepLoadable>false</IncrepLoadable> <Version>4.0.0.28559</Version> <TStamp>2006-11-06T18:01:21.5461976-06:00</TStamp> </Control> - <DataType> <Datatype_id>1</Datatype_id> <name>String</name> <description /> </DataType> - <IncidentLog> <IncidentLog_ID>-10</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.7541536-06:00</TStamp> <Entry>- 'COMMENCE IED SOP/ERG ACTIONS. GATHER ALL INFO.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-11</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.8142454-06:00</TStamp> <Entry>- 'SET INITIAL EXCLUSION AREA.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-12</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.8943678-06:00</TStamp> <Entry>- 'MAKE ALL NOTIFICATIONS.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-13</IncidentLog_ID> <TStamp>2006-11-06T18:01:26.9644749-06:00</TStamp> <Entry>- 'IDENTIFY ON-SCENE COMMAND (OSC)/ COMMAND POST (CP) LOCATION.' checked</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> <Control_ID>-3</Control_ID> </IncidentLog> - <IncidentLog> <IncidentLog_ID>-14</IncidentLog_ID> <TStamp>2006-11-06T18:01:38.6222841-06:00</TStamp> <Entry>Incident Summary selected</Entry> <AddedByUser>false</AddedByUser> <submission_id>0</submission_id> <Priority>Low</Priority> </IncidentLog> </IncrepDataset> XSL: Code: <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited with XML Spy v2006 (http://www.altova.com) --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/> <xsl:template match="/"> <html> <body> <h2>Current Log</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">TStamp</th> <th align="left">Entry</th> </tr> <xsl:for-each select="tstamp/entry"> <tr> <td><xsl:value-of select="TStamp"/></td> <td><xsl:value-of select="Entry"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> I have two other versions of the HTML file that don't require XSL but they only half work. One displays everything I want but not in the right order the other displays in the right order but only displays the first TStamp and Entry. |