Reputation: 113
I have an HTML file which contains anchor tag with the link to another HTML file. When I click on the link in firefox, its not opening the other HTML file. Please refer the below HTML snippet:
<html>
<body>
<table align=left border=1>
<tr><th>Report Name</th></tr>
<tr><td><a href="G:\parent directory\Report\Forms Report Summary_2015-08-25 102050.html" target=report_page>Missing Forms Report</a></td></tr>
</table>
</body>
The issue is that when the link in "href" is clicked and opened in new Firefox window inseted of "G" (capital letter) "g"(small letter) is displayed in Firefox and I get error page not displayed. I am strugggling to understand why Firefox is taking the "G" in caps as small letter "g". Can someone please help me out here?
However, when I open the same link in Chrome or IE its opening fine.
Upvotes: 1
Views: 1050
Reputation: 2859
The specifications of anchors expect a valid uri with a protocol as href:
i.e file
, ftp
, and mailto
or an url fragment #
https://developer.mozilla.org/en/docs/Web/HTML/Element/a#attr-href
In your example it think you need the file
This should work in your case: (check also to escape it, some browsers do strange different things)
<a href="file:///G:\parent directory\Report\Forms Report Summary_2015-08-25 102050.html" target=report_page>Missing Forms Report</a>
Upvotes: 2