views:

417

answers:

2

i use jquery post function to go to server and bring the link to file download.

when the func come back and return the link, i try to open a popup or iframe with link source , to popup save/open file window

i try this

window.open(data.link,'Download','top=20,width=3,height=3,left=20');

or

document.getElementById('download').src=data.link;

its work fine in firefox , but in IE

He show the message : "To Help Protect Your Security, Internet Explorer Blocked.."

how i get over this

EDIT: If i do it from direct link from the page he dont show me this message

+4  A: 

This is due to IE's security settings. By default, IE automatically blocks any automatic downloads. There's no (legit anyway) way you can get around that except by changing the security settings of the browser. The user will be able to download the file by clicking on the bar that it displays, and click download file.

futureelite7
A: 

Well that looks like the popup blocker sort of behavior to me. I don't think you can do anything about this except use an alternative method to fetch the URL.

By the way, visitors are used to the Yellow bar and right clicking on it to get the correct download.

So I don't think you need to panic too much.

Edit: You're not going to be able to change the security settings of everybody's browser. So either give up, or get by.

Cyril Gupta