Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8563223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:54:44+00:00 2026-06-11T16:54:44+00:00

I have the following code: jQuery.post(encodeURI(ajaxurl + ‘?action=form_submission’), { ‘propertyID[]’: propArray, submit: ‘Export Gallery’,

  • 0

I have the following code:

jQuery.post(encodeURI(ajaxurl + '?action=form_submission'), 
{ 'propertyID[]': propArray, submit: 'Export Gallery', NG_nonce: '<?php print    $this->nonce; ?>' },
function (result) {
   var obj = jQuery.parseJSON(result);
   if (typeof(obj['error']) == 'undefined') {
      if (typeof(obj['url']) != 'undefined') {
         window.location.href = obj['url'];
         var confirmBox = confirm('The gallery has been exported.');
      } else {
         alert('Error');
      }
   } else {
      alert(obj['error']);
   }
   if (redirect == 1)   {
        window.location.href = '/wp-admin/media-upload.php?post_id='+propertyID+'&type=image&tab=<?php print $_REQUEST['tab']; ?>';
   } else {
        jQuery(element).html(oldHtml);
   }
});

This works perfectly, it creates a zipped folder that is then downloaded to the users machine. What I need to do is add header information so the user is given the ‘save as’ dialog box. I have tried several different things (trying to use request.setRequestHeader, including header information in the data portion) but I am having no luck. Can someone please send me in the correct direction on this? Thanks.

Or is there a way to add the header information right before

window.location.href = obj['url']

I need to figure this out, Thanks again for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:54:45+00:00Added an answer on June 11, 2026 at 4:54 pm

    This “save as” dialog is up to the browser. Different browsers will handle file downloads differently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have the following code with jQuery: function reject(id) { $.ajax({ type: 'POST',
I have the following snippet of code (I'm using jQuery 1.4.2): $.post('/Ads/GetAdStatsRow/', { 'ad_id':
I have the following code jQuery.getJSON(encodeURI(strUrl), {address:address,state:state, zip:zip},function(data){ alert('HELLO World!'); }); If for some
I have the following code: jQuery: $.ajax({ url: '/personcontroller/getperson', cache: false, type: POST, data:
I have the following code for the jQuery validation plugin.... basically on submit, I
I have the following code: $.post('block_ajax.php' , { 'action': 'set_layout' , 'listid': 123 ,
I have the following jQuery code: $.ajax({ type: POST, url: /search, data: $(form).serialize(), success:
I have the following jQuery code: $('.save').submit(function(e){ var formElement = $(this); var data =
All, I have the following jQuery code: jQuery(#data_form).submit(function() { event.preventDefault(); alert(it submits); }); When
I have the following code: jQuery.ajax({ type: POST, async: true, url: '/index/city', data: {massiv:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.