derek5. 2017-05-26 10:15 采纳率: 100%
浏览 236

通过Ajax发送SVG内容

I'm working on a project where I have a Bussiness Card SVG. and some input where the change some text and color of the card.

After that, I'm getting all the SVG content and send to a server that creates a pdf through TCPDF library and sends the mail.

The code runs perfectly locally but the ajax fail on the client. I try to find the problem but didn't get any success.

Here is the code

  var front = $('#show_card .front_print').html();
  var back = $('#show_card .back_print').html();
  var data = $(this).serialize() + '&action=send_query' +
    '&front_side=' +  encodeURIComponent(front) +
    '&back_side=' +  encodeURIComponent(back);


  $.ajax({
      url: ajaxurl,
      type: 'POST',
      data: data,
      beforeSend: function() {
        $('.image_loader').show();
        $('input[name="submit_order"]').attr('disabled', 'disabled');
      }
    })
    .done(function() {
      $('.image_loader').hide();
      $('.success_msg').show();
      $('#form_complete').removeAttr('disabled');
    });
  • 写回答

0条回答 默认 最新

    报告相同问题?