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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.