{"action":"created","issue":{"url":"https://api.github.com/repos/makeusabrew/bootbox/issues/381","labels_url":"https://api.github.com/repos/makeusabrew/bootbox/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/makeusabrew/bootbox/issues/381/comments","events_url":"https://api.github.com/repos/makeusabrew/bootbox/issues/381/events","html_url":"https://github.com/makeusabrew/bootbox/issues/381","id":54771459,"number":381,"title":"Why doesn't submit a form in a bootbox dialog?","user":{"login":"fellipeh","id":2904206,"avatar_url":"https://avatars.githubusercontent.com/u/2904206?v=3","gravatar_id":"","url":"https://api.github.com/users/fellipeh","html_url":"https://github.com/fellipeh","followers_url":"https://api.github.com/users/fellipeh/followers","following_url":"https://api.github.com/users/fellipeh/following{/other_user}","gists_url":"https://api.github.com/users/fellipeh/gists{/gist_id}","starred_url":"https://api.github.com/users/fellipeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fellipeh/subscriptions","organizations_url":"https://api.github.com/users/fellipeh/orgs","repos_url":"https://api.github.com/users/fellipeh/repos","events_url":"https://api.github.com/users/fellipeh/events{/privacy}","received_events_url":"https://api.github.com/users/fellipeh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-19T14:39:54Z","updated_at":"2015-01-23T17:10:18Z","closed_at":null,"body":"Hello, I have these code:\r\n\r\n```javascript\r\nfunction exec_new($url_add) {\r\n            jQuery.ajax({\r\n                type: 'GET',\r\n                url: $url_add,\r\n                success: function (data) {\r\n                    bootbox.dialog({\r\n                        message: data,\r\n                        title: \"Custom title\",\r\n                        buttons: {\r\n                            success: {\r\n                                label: \"Success!\",\r\n                                className: \"btn-success\",\r\n                                callback: function () {\r\n                                    $('#form_basic').submit();\r\n                                    });\r\n                                }\r\n                            },\r\n                        }\r\n                    });\r\n                }\r\n            });\r\n        }\r\n```\r\n\r\nMy problem is: I have one form, named \"form_basic\" loaded using Ajax, And, I want, when press Confirm bootbox button, submit them, and if all is ok, close ... but these code above doesn't work.\r\n\r\nWhy?\r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/makeusabrew/bootbox/issues/comments/71227226","html_url":"https://github.com/makeusabrew/bootbox/issues/381#issuecomment-71227226","issue_url":"https://api.github.com/repos/makeusabrew/bootbox/issues/381","id":71227226,"user":{"login":"CGeorges","id":2103311,"avatar_url":"https://avatars.githubusercontent.com/u/2103311?v=3","gravatar_id":"","url":"https://api.github.com/users/CGeorges","html_url":"https://github.com/CGeorges","followers_url":"https://api.github.com/users/CGeorges/followers","following_url":"https://api.github.com/users/CGeorges/following{/other_user}","gists_url":"https://api.github.com/users/CGeorges/gists{/gist_id}","starred_url":"https://api.github.com/users/CGeorges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CGeorges/subscriptions","organizations_url":"https://api.github.com/users/CGeorges/orgs","repos_url":"https://api.github.com/users/CGeorges/repos","events_url":"https://api.github.com/users/CGeorges/events{/privacy}","received_events_url":"https://api.github.com/users/CGeorges/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T17:10:18Z","updated_at":"2015-01-23T17:10:18Z","body":"You have an error in your code \r\n $('#form_basic').submit();\r\n                                    });\r\n\r\nthat }); isn't supposed to be there. To avoid this type of errors use a better IDE that highlights syntax errors."}}