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 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
    • ¥20 怎么用dlib库的算法识别小麦病虫害
    • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
    • ¥15 java写代码遇到问题,求帮助
    • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
    • ¥15 关于#Java#的问题,如何解决?