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

通过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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
    • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
    • ¥20 matlab yalmip kkt 双层优化问题
    • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
    • ¥88 实在没有想法,需要个思路
    • ¥15 MATLAB报错输入参数太多
    • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入