Hi,
I am using a jQuery UI dialog but instead of duplicating the dialog setup 5 times, I was wondering if I can somehow pass the div id as a parameter into the document.ready() call or when I call the div in question?
For example>
$(document).ready(function(){
$(function() {
location.hash = 'PAGETOP';
});
$("#dialogou").dialog({
autoOpen: false,
closeOnEscape: false,
resizable: false,
modal: true,
draggable: true,
position: ["center", 100],
buttons: {
'Ok': function() {
$(this).dialog("close");
closeReq();
}
}
});
});
So based on the above, if I have the following if condition:
if (document.getelementbyId("ERROR_OU").value == "Y")
$('#dialogou').dialog('open');
I would like to be able to change the div id dilaogou to dialogao but still use the same call above but obviously swap out dilaogou to dilaogao.
Is this possible - if so, would appreciate some help.
Thanks.