嗨,人们我有这个jquery,这使得打电话到一个页面插入一个电子邮件到新闻列表。jquery ajax调用两次发射
呼叫被解雇两次,网址,有一个奇怪的_我还没有加入的这两个网址是被称为1次点击 参数:
http://www.camerich.co.uk/[email protected]&_=1310316941893
http://www.camerich.co.uk/[email protected]&_=1310316941906
我要如何复制停止呼叫???
Jquerycode:
$('.searchbox_submit').click(function() { // start the click function for news_submit div
// get the email address that has been entered
var emailtoadd = $("#emailtoadd").val();
// set the url to load
var loadUrl = "newsletter_add.php?emailtoadd="+emailtoadd;
// set the status to let the user know we are loading in the data
$("#newsresponse").empty().html('<img src="/images/site/loadinfo.gif" width="16" height="16" align="absbottom" /> Processing Request...');
//load in the data
$.get(loadUrl, {}, function(myData) {
// add the response to the newsresponse div
$("#newsresponse").empty().html(myData);
}); // end get request
});//end click function
HTML代码:
<div class="iconthumbs" style="background-image:url(images/icons/smaller/subscribe_button.jpg)">
<div id="searchwrapper" name="searchForm">
<div class="errortxt" id="newsresponse" style="padding:0 0 0 15px;"></div>
<input type="text" class="searchbox" name="emailtoadd" id="emailtoadd" style="color: #FFF" onClick="this.value='';" onFocus="this.select()" onBlur="this.value=!this.value?'Enter Email To Subscribe':this.value;" value="Enter Email To Subscribe" />
<input type="image" src="/images/site/1px.gif" class="searchbox_submit" id="news_submit" value="" />
</div>
</div>
是的,这只是两个电话中的一个例子更新用于1的两个调用的问题单击。 –