2012-03-24 85 views
0

好的。我是jEditable的新手。我想用jEditable使用jQuery验证。让我解释。在这里,我在一个while循环中从我的数据库中回显一个表,就像这样。jEditable - 无法进行验证

<table id="example" class="display" cellspacing="0" border="0"> 
<thead> 
    <tr> 
    <th> 
    Name 
    </th> 
    <th> 
    Phone 
    </th> 
    </tr> 
</thead> 
<tbody> 
    <tr> 
    <td class="items" userid="'.$row['id'].'" id="name">'.$row['name'].'</td> 
    <td class="items" userid="'.$row['id'].'" id="name">'.$row['email'].'</td> 
    </tr> 
</tbody> 
</table> 

这是jEditable脚本我使用

$(function() { 
$("td.items").each(function(index) {  
$(this).editable("handler.php", { 
submitdata : {userid: $(this).attr('userid')}, 
indicator : "<img src='images/indicator.gif'>", 
tooltip : "Doubleclick to edit...", 
event  : "dblclick", 
onblur : "submit", 
name : 'newvalue', 
id : 'elementid', 

}); 
}); 

的jEditable工作。这很棒。我只想使用jQuery验证码。我把他们放在哪里?

回答

0

使用jEditable的痛苦经历是:很难与其他验证插件集成,比如really_simple_validation。所以我不认为你写简单而干净的代码很容易做到这一点。也许你可以看到它的回调函数?

相关问题