我在接下來的頁面上使用Javascript ...當點擊sumbit按鈕時,它應該在submit botton下面輸出一條消息(該按鈕將使用jQuery將表單傳遞給.php文件並更新數據庫-php然後回聲「謝謝你 - 我們將盡快與您聯繫」 ......
http://make-your-offer.com/private_beta.php
當我的永久鏈接設置爲默認 - 這個工程
當我將它們設置爲別的 - 它不」 t work
我已經嘗試過螢火蟲,但我無法找出在這種情況下做什麼!
這裏代碼
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(document).ready(function(){
$("#myform2").validate({
debug: false,
rules: {
name2: "required",
email2: {
required: true,
email: true
}
},
messages: {
name2: "Please let us know who you are.",
email2: "A valid email will help us get in touch with you.",
},
submitHandler: function(form) {
// do other stuff for a valid form
$.post('/process3.php', $("#myform2").serialize(), function(data) {
$('#results').html(data);
});
}
});
});
的「process3.php」還更新數據庫時固定鏈接都在這不是默認設置 - 但是DIV ID =「結果」格不更新
當固定鏈接設置爲默認 - 結果DIV不會得到更新...
即下面的代碼位
$('#results').html(data);
不改變網頁..我需要改變#到網頁的文件路徑嗎?即(但頁面不results.php ......結果DIV是在頁面private_beta.php ..所以我不知道如何改變這種
$('/results').html(data);
哎呀它快把我逼瘋...
乾杯
你可以把代碼? – krembo99 2012-01-31 23:38:15
我已經更新了上面的代碼 – mayhem3030 2012-02-01 06:43:37
如何從服務器返回'data'看起來像,我敢打賭問題在那裏,調試它。 – gdoron 2012-02-01 08:35:35