Want to load jquery dialog from a different web-page

Posted by Jake on Stack Overflow See other posts from Stack Overflow or by Jake
Published on 2010-03-26T19:04:30Z Indexed on 2010/03/26 19:13 UTC
Read the original article Hit count: 408

Filed under:
|
|

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 .

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery