Easyui export Excel can not eject the download box quick Solution _jquery

Source: Internet
Author: User

Previously done with Ajax, the code is as follows (ActionURL is the path to the generic handler ashx):

$.ajax ({ 
 url:actionurl + '? action=export&id= ' + $ (' #fm_ID '). Val (), 
 dataType: ' JSON ', 
 success: function (jsonstr) { 
  //top.art.dialog.tips (' Export succeeded! '); 
 } 

There is no way to eject the download box.

Direct browser address bar to enter the relevant page address and open the download box can be pop-up download, consider may be the reason for the IFRAME.

Because the input page address can open the download box, so consider opening a new page download, but because of the npoi for export, to pass the DataTable, so do not do so.

Want to use the window.showModalDialog method:

 

However, only a blank form pops up and is not downloaded.

So finally using window.open to achieve:

 

The above is a small series for you to bring the Easyui export Excel can not pop-up download box of the quick solution to all the content, I hope that we support cloud Habitat Community ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.