Want to load jquery dialog from a different web-page
- by Jake
I'm a bit of a n00b with jquery so this one is probably an RTFM question:
I'm writing an application to create a somewhat complex record for my client. Building the record requires doing a couple of server side searches inside a dialog.
Right now I have everything framed up in 1 file (asp.net) and it's ok. But I can see as I add the business logic and the communication with the server this is going to get really ugly. I'm alreay putting most of the javascript in external files, but I'd like to move the HTML for the dialogs out too.
How do I get the jquery dialog method to load the dialog body from the html files?
Something like:
getDialogHTML(dialogHolderDiv); <---magic goes here
var dialogOptions = { ... };
$("#"+dialogHolderDiv).dialog(dialogOptions);
$("#"+dialogHolderDiv).dialog('open');
any help will be apperciated .