Fixed:

http://www.pastie.org/185632

Looks like $A instead of new Array() or new Object fixes it.

On Wed, Apr 23, 2008 at 11:27 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

> Anyone know why posting an array in an Ajax Request would send the
> prototype functions along with my data?
>
>  function sendWarnings() {
>    // Grab everything with the warning class name and add
>    // it's value to an array.
>    var warnings = new Array();
>    $$('.warning').each(function(x, index) {
>      warnings[index] = x.value;
>      console.log(x.value, index);
>    });
>
>    // Post the warnings and display the response
>    new Ajax.Request('ajax_send.php?tst=' + $('tst').value,  {
>      parameters: warnings,
>      method: 'post',
>      onSuccess: function(transport) {
>        $('multi_send_rspnce').innerHTML = transport.responseText;
>      }
>    });
>  }
>
>
> A simple print_r from PHP gives me both the data, and a bunch of
> prototype's object functions. Any idea why I'd get those and not just
> the data?
>
> Here's an easier to read version: http://www.pastie.org/185523
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to