Ok, that title is a mouthful but pretty much says my entire issue.
I have a jQueryUI dialog on my page which is initialised with:
$('#dialog').dialog({
width: 1024,
height: 768
});
and the links that open it are initialised wtih:
// Dialog Link
$('.dialog_link').click(function(){
$('#dialog').dialog('open');
return false;
});
So, I use the following code to load a php document into the dialog and display it
$("#openLink123").click(function()
{
$('#dialog').load("/scripts/dialogContent.php",
function() {
$('#dialog').dialog("option","title","Add")
}
)
});
The content loads into the dialog and forms etc work just fine, but any javascript I run inside that php document does not. If I close the dialog and reopen it however, all the javascript works.
I'm a bit stumped as to how I can make it so that the javascript runs the first time the dialog loads.