[jQuery] Forms and Dialog UI

2009-08-11 Thread apadley

I am using the Dialog UI and want to post a very simple form. In add
browsers tested (Windows  Mac), the form data does post to the action
page, but there is no response so the callback fails. However, one Mac
G5 computer running 10.5.8 and Firefox 3.5.2 or Safari 4.0.2
everything works perfectly. Data posts properly and I receive the
anticipated response triggering the callback.

Looking at Firebug (novice user here) I see a discrepancy between the
one computer that works and the others that don't. On the G5 that
works, under the Net tab, I see the normal POST designation followed
by the action page's url. On all other computers (various Macs and
Windows) POST is missing and is replaced by OPTIONS. I haven't
been able to figure out what that means. Anyway, the jquery code is
below and I'd appreciate comments.

$(document).ready(function() {
$('#myForm2').ajaxForm(function() {
alert(Thank you for your comment!);
});

$(#dialog).dialog({
bgiframe: true,
autoOpen: false,
width: 620,
modal: true
});

$('#create-user').click(function() {
$('#dialog').dialog('open');
});

});


[jQuery] Re: ajaxSubmit and Loading message

2008-02-10 Thread apadley

I had the latest of both and it turns out it was working fine. I just
needed to work with some longer processing times.

Thanks for all the help.

On Feb 7, 4:35 pm, Mike Alsup [EMAIL PROTECTED] wrote:
  jQuery(options.target).attr(innerHTML, data).evalScripts is not a
  function

 What versions of jQuery and the Form Plugin are you using?


[jQuery] Re: ajaxSubmit and Loading message

2008-02-07 Thread apadley

Thanks, but I still must be doing something wrong because I get the
following error:

jQuery(options.target).attr(innerHTML, data).evalScripts is not a
function

Here's the code I currently have:

var v = jQuery(#two).validate({
submitHandler: function(form) {
jQuery(form).ajaxSubmit({
target: #ajax,
beforeSubmit: function () {
        $('#container').html('Loading...')
        },
clearForm: true
});
},
debug: true,
errorContainer: container,
errorLabelContainer: $(ol, container),
wrapper: 'li',
event: keyup
});

Thanks.



On Feb 7, 5:33 am, Christoph Haas [EMAIL PROTECTED] wrote:
 On Wed, Feb 06, 2008 at 08:21:25PM -0800, apadley wrote:
  I have a complex form that uses ajaxSubmit (see code below). The form
  takes awhile to process and I'd like to display a loading message or
  loading gif while waiting for the response. How can I modify or add to
  the code below to accomplish this. The message or gif should appear in
  the #container div.

  var v = jQuery(#two).validate({
                     submitHandler: function(form) {
                             jQuery(form).ajaxSubmit({
                                     target: #ajax,
                                     resetForm: true
                             });
                     },
                     debug: false,
                     errorContainer: container,
                     errorLabelContainer: $(ol, container),
                     wrapper: 'li',
                     event: keyup
             });

  I have tried adding the following which shows the loading gif, but
  does not display the result from the action page in the ajax div :

  $(#container).ajaxStart(function(){ $(this).show(); }).ajaxStop
  (function(){ $(this).hide(); });

 Seehttp://malsup.com/jquery/form/#options-object
 You can use beforeSubmit pointing to something like

     function () {
         $('#container').html('Loading...')
         }

 Works here (tm).

 Cheers
  Christoph
 --
 [EMAIL PROTECTED]  www.workaround.org   JID: [EMAIL PROTECTED]
 gpg key: 79CC6586         fingerprint: 
 9B26F48E6F2B0A3F7E33E6B7095E77C579CC6586


[jQuery] ajaxSubmit and Loading message

2008-02-06 Thread apadley

I have a complex form that uses ajaxSubmit (see code below). The form
takes awhile to process and I'd like to display a loading message or
loading gif while waiting for the response. How can I modify or add to
the code below to accomplish this. The message or gif should appear in
the #container div.

var v = jQuery(#two).validate({
submitHandler: function(form) {
jQuery(form).ajaxSubmit({
target: #ajax,
resetForm: true
});
},
debug: false,
errorContainer: container,
errorLabelContainer: $(ol, container),
wrapper: 'li',
event: keyup
});

I have tried adding the following which shows the loading gif, but
does not display the result from the action page in the ajax div :

$(#container).ajaxStart(function(){ $(this).show(); }).ajaxStop
(function(){ $(this).hide(); });

If I just use the following I get the loading gif in the container div
and the result in the ajax div, but the loading gif does not disappear
when the ajax div finishes loading:

$(#container).ajaxStart(function(){ $(this).show(); });

Thanks.