javascript - Open .docx file in new tab from anchor tag - Stack Overflow

I have included docx file for terms and condition in our project.Now i need to open it in new tab. I ag

I have included docx file for terms and condition in our project.

Now i need to open it in new tab.

I agree to this Email campaign <a title="click to view terms and conditions" style="color:blue;" target="_blank" href="{$Site.ContentPath}/public/EmailServicesTermsofUse.docx">terms and conditions</a>.

However it is downloading the file rather than opening it new tab.

How can i achieve this. I am open for any kind of solution that will meet this condition.

Thanks in Advance!!!

I have included docx file for terms and condition in our project.

Now i need to open it in new tab.

I agree to this Email campaign <a title="click to view terms and conditions" style="color:blue;" target="_blank" href="{$Site.ContentPath}/public/EmailServicesTermsofUse.docx">terms and conditions</a>.

However it is downloading the file rather than opening it new tab.

How can i achieve this. I am open for any kind of solution that will meet this condition.

Thanks in Advance!!!

Share Improve this question edited Nov 25, 2013 at 10:30 Milind Anantwar asked Nov 25, 2013 at 10:19 Milind AnantwarMilind Anantwar 82.2k26 gold badges96 silver badges128 bronze badges 0
Add a ment  | 

2 Answers 2

Reset to default 3

You can't directly view doc or docx files in html pages like PDF file.

You have to use some docx extractor to extract the contents and display it in Html Page.Provide more details about your application.

For Java Application:- docx4j is suitable for extracting docx files.

Most browsers by default won't load a .docx in the browser. You might have better luck hosting it as a .pdf.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745139772a4613375.html

相关推荐

  • javascript - Open .docx file in new tab from anchor tag - Stack Overflow

    I have included docx file for terms and condition in our project.Now i need to open it in new tab. I ag

    5小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信