Now that you mention it. *slaps forehead*
On Sep 22, 9:34 am, Scott González <[email protected]> wrote: > Sounds like you have two elements that match the selector > ".formresponse" > > On Sep 21, 2:39 pm, theosoft <[email protected]> wrote: > > > I've modified my functions so that the ajaxForm is not being loaded on > > load, but on demand, so I now have: > > > function formSubmit(target, form, success){ > > var formoptions = { > > target: target, // target element(s) to be updated > > with server response > > //beforeSubmit: showRequest, // pre-submit callback > > success: success// post-submit callback > > > // other available options: > > //url: url // override for form's 'action' > > attribute > > //type: type // 'get' or 'post', override for > > form's 'method' attribute > > //dataType: null // 'xml', 'script', or > > 'json' (expected server response type) > > //clearForm: true // clear all form fields after > > successful submit > > //resetForm: true // reset the form after successful > > submit > > > // $.ajax options can be used here too, for example: > > //timeout: 3000 > > }; > > $(form).ajaxForm(formoptions); > > > } > > > function createDialog(element){ > > $(element).dialog({ > > modal: true, > > autoOpen: false, > > show: 'slide', > > hide: 'slide', > > buttons: { > > Ok: function() { > > $(this).dialog('close'); > > } > > } > > }); > > > } > > > Then bind a click event to the Submit button: > > createDialog(".formresponse"); > > $(".contact_submit").click(function(){ > > formSubmit('.formresponse', '.submitform', > > function(){$ > > ('.formresponse').dialog('open');}); > > }); > > > The latter being loaded as the page loads. > > > Still getting two dialogs. Using Jquery 1.3.2, UI 1.7.2, FF3.5. > > Behaviour happens in IE8 as well. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
