2010-08-03 10 views
0

라디오 버튼을 클릭 한 후 표시 할 수있는 jquery 대화 상자가 하나 있습니다. 당신이 $(":button").click() 달성 하려는지jquery 대화 상자가 나타나지 않습니다.

<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> 

답변

0
$(":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? 
    }); 

:이 보여줄 수 있지만 대화 상자에서 제출을 위해 내가 어떤 스크립트를 넣어 후, 대화 후 보여 radiobutton.this을 클릭하지 될 마지막으로 내 코드입니다 ? 거기에 오류가 발생했습니다 ...

+0

jquery 대화 상자에 두 개의 제출 버튼이 있습니다. 누군가가 우리가 한 폼에 많은 버튼을 가지고 있다면 제출을 위해 tat 코드를 사용하라고 말합니다. 당신은 이것에 대해 어떤 생각을 가지고 있습니까? – klox

+0

위의 오타 표시를 제거하십시오. 구문 오류입니다. – Reigel

관련 문제