Can not call methods
Can not call methods
I have a select box with a choice of object. When you select an object, a table appears with a certain set of data. Below the table is the add button, which opens the dialog box. When you first select from the select box, everything is OK, the dialog box opens normally. buttons disappear, title, given window size. I use jquery-ui. I attach the code:
- <script type="text/javascript">
- $(function () {
- $("#testdlg").dialog({
- modal: true,
- autoOpen: false,
- title: "ADD",
- height: "auto",
- width: 400,
- position: {
- my: "center",
- at: "center",
- of: window
- },
- buttons: [
- {
- text: "SAVE",
- click: function() {
- ......
- $.ajax({
- url: 'test_.php',
- method:"POST",
- data: {
- ....
- },
- success: function (data){
- window.location.reload()
- }
- })
- }
- },
- {
- text: "CLOSE",
- click: function() {
- $( this ).dialog( "close" );
- }
- }
- ]
- });
- $("#my_button").click(function (e) {
- e.preventDefault();
- $("#testdlg").dialog().dialog("open");
- });
- });
- </script>