English 中文(简体)
页: 1 证 证 证 证 证 证 证 证 证 证 证 证 证 证 证 证 结 证 : 如何产生错误信息,以 j
原标题:jQuery validation: how to output error message to jQuery UI modal dialog

我怎么能够改变j Query鉴定的错误信息,以便在验证错误时,把错误作为 jUi模式方言中的子弹点。

固然如此,但还是按预期(即模式方言一度只是 app子,但在关闭之后,我第二次提交无效数据时,可以带回模式方言。

任何建议都将受到赞赏。 谢谢。

...
        $("#myform").validate({
          debug: true,
          errorPlacement: function(error, element) {
            error.prependTo( #dialog-message );
          },
          errorLabelContainer: $("dialog-message ul"),
          onblur: false,
          onkeyup: false,
          onsubmit: true,
          wrapper: "li",
          showErrors: function() {
            //$("#dialog").dialog("destroy");
            $("#dialog-message").dialog({
              modal: true,
              buttons: {
                Ok: function() {
                  $(this).dialog( close );
                }
              }
            });
            this.defaultShowErrors();
          }
        });
...

      <div id="dialog-message" title="Download complete">
        <p>test</p>
      </div>
最佳回答

改变这一思路:

$("#dialog-message").dialog({

为此:

$("#dialog-message").dialag( destroy ).dialog({

这将正确摧毁/重新种植植被,或替代......

这份文件。 准备:

$(function() {
  $("#dialog-message").dialog({
     modal: true,
     autoOpen: false,
     buttons: { Ok: function() {
         $(this).dialog( close );
       }
     }
  });
});

在您的确认中,这只是你再次打开同样的辩词:

      showErrors: function() {
        $("#dialog-message").dialog( open );
        this.defaultShowErrors();
      }
问题回答

仅使用提交书的确认,在贵格文法中添加这些选择:

jQuery("#myForm").validate({
            ...
            onfocusout: false,
            onkeyup: false,
            onclick: false,
            ....




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签