Local files in IFRAME

Hey all,

I'm developing an application that requires an IFRAME to display a dynamic URL. This url can be a file (file://), web page (http://), or (ftp://). My question is about the file. When I give set the IFRAME src to something like "file://d:\test.html" I get nothing but a blank html.
Can someone please direct my attention to what may be causing this and how to fix it?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If the file  is on a web server / website and it's in the root you can use:

<IFRAME SRC="test.html" TITLE="Test IFRAME" SCROLLING="auto" NAME="test" WIDTH="500" HEIGHT="150" ALIGN="center" FRAMEBORDER="yes">

or absolute
<IFRAME SRC="http://www.yourwebsite.com/test.html" TITLE="Test IFRAME" SCROLLING="auto" NAME="test" WIDTH="500" HEIGHT="150" ALIGN="center" FRAMEBORDER="yes">

Good Luck hope this helps!
hmstechsupportAuthor Commented:
I understand how to navigate to files via IFRAME. What i'm trying to get at is totally different. Here is an example:

I am a user using my web application. Inside the application is an IFRAME that contains a URL of my choice. As the user, I would like to have a text file that I created show up in the IFRAME. So, I've created my text file, test.txt, and set the URL to appear as 'file://c:\test.txt'
When attempting to view this text file in my IFRAME the next time I load the application the IFRAME turns up blank. How come the text file isn't displayed?

This is the question to ponder. Thank you for your response though.
hmstechsupportAuthor Commented:
P.S. the IFRAME tag would look like <IFRAME src="file://c:\test.txt">

this works locally but not on a server.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

I believe you need to use a UNC for this to run it from the server:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hmstechsupportAuthor Commented:
Sorry for the delay, i was responding to say thanks when we had a power failure. Thanks seanpowell. Just to follow up, I discoverd that the protocol must read file:/// with 3 /'s.

Thanks Again!
I hate power failures...

Thanks for the A :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.