Jump to content

Modal Dialog Advice, Forms, Alerts & Confirmation


4xjbh

Recommended Posts

I was wondering if I use model dialogs for forms, confirmation and alerts should I be using one div and use jquery to set the parameters or should I have a div for each input form (catalogue, companies etc), a confirmation div, alert div, etc.

 

What would be the best way to load in html files dynamically into one div (one file at a time) if I go that way.

 

Options, options, options. 

 

What lessons have you learnt regarding this or am I over complicating this?

 

James.

For simple alerts/confirmations I just do a dynamic div. Something like:

function jqAlert(msg){
  $('<div>').html(msg).dialog({modal: true, close: function(){ $(this).dialog('destroy').remove(); }});
}
For something like a form I usually do a dynamic div like above but set the content to an iframe which then loads the form. You could alternativly just use jquery's .load() method to load the document directly into the div though.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.