2016-11-01 2 views
1

Ich möchte die Schaltfläche Doc übermitteln, wenn der Dialog zum ersten Mal geladen wird .. Wie kann ich das tun?Disable Struts jquery Dialog-Taste auf öffnen

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> 
 
<sj:dialog id="submitdialog" resizable="false" autoOpen="false" modal="true" width="800" height="440" 
 
buttons="{ 
 
    \t \t \t \t \t \t \t \t \t \t \t \t \t 
 
'Submit CAD':function() { submitOk(); }, 
 
    \t \t \t \t \t \t \t \t \t \t \t \t \t 
 
    'Cancel':function() { submitCancel(); } 
 
    \t \t \t \t \t \t \t \t \t \t \t \t \t 
 
}" title="Submit Document"> 
 
</sj:dialog>

Antwort

1

Sie können es so jQuery verwenden. Beim Öffnen des Dialogs können Sie dies in der document.ready Funktion gesetzt:

$("#submitdialog").next(".ui-dialog-buttonpane button:contains('Submit CAD')") 
 
       .prop("disabled", true);

Hoffe, es funktioniert