Msg#: 4417803 posted 7:34 am on Feb 15, 2012 (gmt 0)
hi, i want to create a link in an html environment to open text file in a new page. can some help because i can create a link to open a html and php file its working but it cant open a txt file. please find the coding i used: <div style="position:absolute;bottom:0px; text-align:center;left: 450px;"><a href = "code.txt" target= "_blank"> code</a> </div>
Msg#: 4417803 posted 8:24 pm on Feb 15, 2012 (gmt 0)
You have to place txt file in the same folder where you have saved html file and don't give any extra space in A tag. You can test it by placing both files on your desktop, then your code would be like this <a href="test.txt" target= "_blank">TEXT FILE LINK</A> Thanks
[edited by: tedster at 11:17 pm (utc) on Feb 15, 2012]
Msg#: 4417803 posted 12:17 am on Feb 16, 2012 (gmt 0)
I'm with the previous posters in thinking that you're either running into either a directory path or mime type issue.
Also, if you don't absolutely have to post the content in a text file, you could try creating a basic HTML template and pasting the content within a <pre> element. This would keep the door open to format the content down the road.