4xjbh Posted September 2, 2013 Share Posted September 2, 2013 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. Quote Link to comment Share on other sites More sharing options...
kicken Posted September 2, 2013 Share Posted September 2, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.