views:

24

answers:

1

i have one jquery dialog which can show after click radiobutton. last time it can show but after i put some script for submit from dialog, the dialog become not show after click the radiobutton.this is my code:

<script type="text/javascript">
    $(document).ready(function() {
        $('#dialog').dialog({
            autoOpen: false
        });
        $("#gen2").click(function() {
            $("#dialog").dialog('open');
            $("#status").hide();
        });
        $(".defect").click(function() {
            $("#status").show();
        });
        $(":button").click(function() {
            $("#inputdefect").submit() {
                $.ajax({
                    type: "post",
                    url: "process1.php",
                    data: "status="+str+"&action=defstat",
                    cache: false,
                    success: function() {
                        $(".defect").removeAttr("checked");
                        return this;
                    }
                });
            }
        });
    });
</script>
A: 
   $(":button").click(function() {
        $("#inputdefect").submit() '{'  <-- is this typos?
            $.ajax({
                type: "post",
                url: "process1.php",
                data: "status="+str+"&action=defstat",
                cache: false,
                success: function() {
                    $(".defect").removeAttr("checked");
                    return this;
                }
            });
        '}' <-- is this typos?
    });

what are you trying to achieve with $(":button").click()? you got errors there...

Reigel
i have two submit buttons in jquery dialog. someone tell me to use tat code for submit if we have many buttons in one form.are you have any idea for this?
klox
just try to remove those labeled typos above. It's a syntax error.
Reigel