Niall Gallagher
asked on
Jquery Dialog empty
Hi again,
I have set up a dialog box for updating or creating a new record which opens by a link click
About 8/10 times everything runs perfect but every once in a while the dialog opens and is empty (No labels, textboxes or dropdowns).
I have no idea what is causing it so any help would be highly appreciated.
Thanks
I have set up a dialog box for updating or creating a new record which opens by a link click
<a href="javascript:getAddRemark()">Add Remark</a>
which calls my script
function getAddRemark() {
$.ajax({
type:"GET",
url:"/Remarks/Create/" + TreeId,
success: function(content) {
$("#rinput").dialog({modal: true, width:425, resizable: false, title: "Add Remark", dialogClass: "mydialog" });
$("#irinput").html(content);
$(".date").datepicker();
}
});
}
About 8/10 times everything runs perfect but every once in a while the dialog opens and is empty (No labels, textboxes or dropdowns).
I have no idea what is causing it so any help would be highly appreciated.
Thanks
ASKER
I could be wrong but I don't think $(document).ready comes into this issue as it is a named function and is being called by a button click.
I will try it anyway
I will try it anyway
ASKER
When I put in $(document).ready it treats it like I'm trying to call it when the page opens and then fails because there are no parameters yet
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Chris,
Thanks again, that seems to have done the trick swapping the lines. So far I tried it about 8 times and it was populated every time.
Thanks
Thanks again, that seems to have done the trick swapping the lines. So far I tried it about 8 times and it was populated every time.
Thanks
Open in new window
Open in new window