Loading...

prototype-scriptaculous@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [Proto-Scripty] Re: Ajax.Request fails, while vanilla XHR works fine Walter Lee Davis Wed Apr 11 20:00:39 2012

I understand the SOP, I was wondering why it worked when I violated SOP from a 
hard-coded XHR request. Under the hood, it is my understanding that Prototype 
sets up a very similar XHR request anyway. It doesn't make any sense that the 
one would work while the other did not. This server is specifically kinked to 
allow a request such as this, or else the SOP would cause it to fail no matter 
what. Can anyone point out the flaw in my logic here?

Walter

On Apr 11, 2012, at 9:00 PM, Jason wrote:

> 
> Have you tried to just use
> 
> new Ajax.Request('index.php', .........);
> 
> vs the full URL
> 
> from the Ajax.Request source code
> 
> * - url (String): The URL to fetch. When the _same-origin_ policy is
> in
> * effect (as it is in most cases), `url` **must** be a relative URL or
> an
> * absolute URL that starts with a slash (i.e., it must not begin with
> * `http`).
> 
> 
> On Apr 10, 7:52 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
>> Typo, fixed; still fails, same error, before ever reaching this line.
>> 
>> On Apr 10, 2012, at 10:50 PM, Walter Lee Davis wrote:
>> 
>>>        var data = responseText.evalJSON();
>> 
>> s/b var data = transport.responseText.evalJSON();
>> 
>> Walter
> 
> -- 
> 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 [EMAIL PROTECTED]
> To unsubscribe from this group, send email to [EMAIL PROTECTED]
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 

-- 
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 [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.