Butani Vijay
Butani Vijay

Reputation: 4239

unable to open xml file from server using anchor tag

i Have one xml file in server i am trying to open it in browser when user click on link so i have set link as below. but it does not opening file.

code :

<a title="View XML" href="file://///90.0.0.15/docmgmtandpub/PublishDestinationFolder/index.xml" target="_blank"> Click here </a>

i have also try using javascript as below:

function openFL()
{

    window.open("file:////90.0.0.15/docmgmtandpub/PublishDestinationFolder/index.xml"); 
}

if i copy path and try opening in browser directly it working fine but not working through code.

Upvotes: 0

Views: 486

Answers (1)

Quentin
Quentin

Reputation: 944116

Linking to file:// URIs from webpages is fraught with security restrictions and variances in how browsers handle file:// URIs - especially with network paths.

Serve the file over HTTP instead.

Upvotes: 1

Related Questions