I am having problems with the code below. Basically it's 2 parts in the function...
Part 1 just clicks on a submit button and Part 2 shows a dialog.
For some reason both parts run separately work but when added together in the function no dialog appears, so when together Part 2 does not run.
Syntax issue?
Here's the code:
function myfunction() {
$('input[type=submit]#mysubmit').click();
$("#info").dialog({
autoOpen: false,
modal: true,
width: 400,
zIndex: 9999999,
resizable: false,
buttons: [
{
text: "Close",
click: function () {
$(this).dialog("close");
}
}
]
});
}
Update: I've tried commenting out Part 1 and the dialog still doesn't show up so it's something to do with the Dialog code ... Part 2
See below:
function myfunction() {
//$('input[type=submit]#mysubmit').click(); //commented out
$("#info").dialog({
autoOpen: false,
modal: true,
width: 400,
zIndex: 9999999,
resizable: false,
buttons: [
{
text: "Close",
click: function () {
$(this).dialog("close");
}
}
]
});
}