English 中文(简体)
Ajax 对应内容
原标题:Ajax Response Content-Disposition attachment

我正在建立一个网站,通过javascript进行沟通,并有一个网络服务,接受json的请求。 我用XMLHttpRequest发出这些要求。 在某些情况下,该处还收到下载回复:

例:

Content-Disposition: attachment; filename="somefile.txt"
Content-Type: application/force-download
Content-Length: 3

123

如果是文件。 所在地点是指符合上述答复的URL,浏览器将自动使用户能够下载文件方言。

我的问题是: 我对XMLHttpResponse物体也产生了同样的影响? 是否有一刀切或什么? 不幸的是,在XMLHttpRequest物体上没有目标成员,例如有html表格,如果我能够把全部反应(与头盔)转移到新的一页或隐藏的iframe上,这个问题就会得到解决,我猜测。

问题回答

我不认为。 但是,你可以试图将隐蔽的形式提交隐藏的iframe。





相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签