-
open file
Is there a way to be able to click on a hyperlink to open a file in an iframe? I have:
Code:
<a href="??????">Open File</a>
<iframe name="MyFrame1" src="C:\My File\" ></iframe>
</body>
So the frame shows the file in C:\My File\. I want to be able to click on the hyperlink and make it open that file. (Please bear in mind that I have no idea what I'm doing with HTML.) Thanks for any help.
-
If the file is a .html file or a .txt file then you can just browser to it. but .exe files cannot be opened. other things like .doc and .pdf will automatically be recognised and opened in the right application.
To load up say a text file in the iframe do this:
Code:
<a href="c:\myfile\a.txt" target"ifr">c:\myfile\a.txt</a><br />
<a href="c:\myfile\b.pdf" target"ifr">c:\myfile\b.pdf</a><br />
<iframe id="ifr"></iframe>
Maybe that id="" should be name="". I can't rememeber.
-
For newer browsers id should be used, olders only support name, so for backward and forward compatibility you can use both at the same time for now.