weixin_33726318 2014-04-09 05:23 采纳率: 0%
浏览 34

Ajax表单返回错误

I am trying to post a form through AJAX in Netsuite so that I could trigger an event after the form submit without actually reloading it.

Please help me out, I am a newbie with AJAX.

Here is the code

$('#du_joinnow').submit(function(e){
  e.preventDefault(); //STOP default action
  var formdata = $(this).serializeArray();
  $.ajaxSubmit({
    type: "POST",
    url: "https://forms.na1.netsuite.com/app/site/crm/externalleadpage.nl?compid=XXXXXX&formid=1&h=XXXXXXXXXXXXXX"+ formdata,
    data: formdata,
    success:function(data, textStatus, jqXHR) {
      $('#overlay').fadeIn(); //data: return data from server
    },
    error: function(jqXHR, textStatus, errorThrown) {
      alert("Ajax Call Failed.");//if fails
    }
  });
  return false;
});
  • 写回答

2条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥30 如何降低hdfs中datanode的JVM内存用量
      • ¥15 Android URL如何转成视频/音频,可行吗?
      • ¥20 SQL数据查询,子查询
      • ¥15 c++字符串分割问题
      • ¥15 vue+uniapp
      • ¥15 android freedom
      • ¥15 关于STM32的SPI和ENDAT接口编码器通信的问题
      • ¥15 关于#pdfbox#生成的PDF文件正常,转图片中文乱码的问题,如何解决?
      • ¥15 ADS中有关DAC控件的使用问题
      • ¥15 win11如何运行geoserver