I've got this:

var jobs = getChecked();
                                jobs = jobs.toJSON();
                                new Ajax.Request("ajax.php", {
                                        parameters: {
                                                o: 'service',
                                                m: 'getMultiPSEmail',
                                                serviceID: jobs
                                        },
                                        onSuccess: function(x) {
                                                var to_field = x.responseText;
                                                $('server_email_subject').value;
                                                var url = "ajax.php";
                                                new Ajax.Request(url, {
                                                        method: 'post',
                                                        parameters: {
                                                                o: 'servers',
                                                                m: 'send_email',
                                                                to: to_field,
                                                                subject: 
subject_field,
                                                                body: body_field
                                                        },
                                                        onSuccess: 
function(req) {
                                                                
alert(req.responseText);
                                                                var response = 
req.responseText.evalJSON(true);
                                                                
if(response.status == "100") {
                                                                        
jQuery("#emailClientModal").dialog('close');
                                                                        
message("Email Sent");
                                                                        
//jQuery('#messageModal').dialog('open');
                                                                }
                                                                else {
                                                                        
jQuery('#emailClientModal').dialog('close');
                                                                        
jQuery('#error_message_modal').data('title.dialog', "Error
"+response.errornum);
                                                                        
$('error_message_body').innerHTML = "Sending of the email
failed:<br/><br/>"+response.errormessage;
                                                                        
jQuery('#error_message_modal').dialog('open');
                                                                }
                                                        },
                                                        onFailure: 
function(req) {
                                                                
alert(req.responseText);
                                                        }
                                                });
                                        }
                                });

The 1st Ajax.Request works fine, I get the responseText as
anticipated. However, the 2nd one doesn't fire and I can't figure out
why. Safari doesn't show any errors.

I've done this before, any idea why this would break?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to