[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread Tobie Langel

Hi,

I've spent quite a long time adding JSON support to Prototype and have
recently committed my changes to the Ajax branch.

You can read more about it here:
http://groups.google.com/group/prototype-core/browse_thread/thread/43c13d4b233b20fb?hl=en

Some things still need to be smoothened out, but it's working
perfectly and the API should not see any further changes.

Regards,

Tobie


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread Ken Snyder

Andrew Dupont wrote:
> (I seem to recall there's an older version
> of Crockford's library that plays nice -- Mislav, do you know where to
> find it?)...
>   
I posted an older version several weeks ago on ROR-spinoffs.  There are 
several versions of JSON that don't rely on Object.prototype; they 
create a JSON object with methods stringify and parse.  Pick your favorite:

http://www.google.com/search?q=json+stringify+parse

Regards,
Ken Snyder

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread Andrew Dupont

You're still treating Request.responseText as if it were JSON, even
though you're no longer converting it to JSON.  The solution is not to
remove the JSON conversion -- it's to find a JSON library that doesn't
muck with Object.prototype. (I seem to recall there's an older version
of Crockford's library that plays nice -- Mislav, do you know where to
find it?)

We're working on the larger issue that makes your initial code not
work in the first place. Meanwhile, this list is for discussion of
Prototype development.  Support questions should go to the rails-
spinoffs mailing list [1].

Cheers,
Andrew

[1] http://groups.google.com/group/rubyonrails-spinoffs


On Feb 23, 10:47 pm, "RFLudwick" <[EMAIL PROTECTED]> wrote:
> I still can't get it to work, no matter what I do. Now it won't work
> in IE:
>
> new Ajax.Request(URL,
> {
> parameters:
> {
> Name: Name,
> Email_Address: Email_Address,
> Message: Message
> },
> onFailure: function(Request)
> {
> $("Ajax_Processing_1").setStyle({visibility: 
> "hidden"});
> $("Submit_1").enable();
>
> ajax_error();
> },
> onSuccess: function(Request)
> {
> var Results = Request.responseText;
>
> if(Results == "")
> {
> website_error();
> }
> else if(Results["Error_Number"] != null)
> {
> alert(Results["Error_Message"] + " (" 
> + Results["Error_Number"] +
> ")");
> }
> else
> {
> new Insertion.After("contact_me", 
> Results["Success_Message"]);
> $("contact_me").hide();
> }
>
> if((Results == "") || 
> (Results["Error_Number"] != ""))
> {
> 
> $("Ajax_Processing_1").setStyle({visibility: "hidden"});
> $("Submit_1").enable();
> }
> }
> });


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread RFLudwick

I still can't get it to work, no matter what I do. Now it won't work
in IE:

new Ajax.Request(URL,
{
parameters:
{
Name: Name,
Email_Address: Email_Address,
Message: Message
},
onFailure: function(Request)
{
$("Ajax_Processing_1").setStyle({visibility: 
"hidden"});
$("Submit_1").enable();

ajax_error();
},
onSuccess: function(Request)
{
var Results = Request.responseText;

if(Results == "")
{
website_error();
}
else if(Results["Error_Number"] != null)
{
alert(Results["Error_Message"] + " (" + 
Results["Error_Number"] +
")");
}
else
{
new Insertion.After("contact_me", 
Results["Success_Message"]);
$("contact_me").hide();
}

if((Results == "") || (Results["Error_Number"] 
!= ""))
{

$("Ajax_Processing_1").setStyle({visibility: "hidden"});
$("Submit_1").enable();
}
}
});


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread Andrew Dupont

On Feb 23, 4:37 pm, "Colin Mollenhour" <[EMAIL PROTECTED]> wrote:
> Man this is getting annoying.. I wish json.org would change their code
> or Prototype would use $H().each in setRequestHeaders or both
> (preferable) would happen soon. This is popping up on Rails Spinoffs
> at least twice a day it seems.

I agree.  Mislav, can you work on a focused patch for this, as opposed
to the Object.prototype vaccine you'd proposed earlier?  It's got to
be worth it to get this issue off the mailing lists.

Cheers,
Andrew


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread RFLudwick

Still not working. I removed the JSON code and here's the new request:


new 
Ajax.Request("http://www.robertzone.com/ajax/contact_me.php";,
{
parameters :
{
Name : Name,
Email_Address : Email_Address,
Message : Message
},
method : "post",
onFailure : ajax_error,
onSuccess : function(Request)
{
var Results = Request.responseText;

if(Results == false)
{
website_error();
}
else if(Results["Error_Number"] != null)
{
alert(Results["Error_Message"] + " (" + 
Results["Error_Number"] +
")");
}
else
{
new Insertion.After("contact_me", 
Results["Success_Message"]);
$("contact_me").hide();
}

if((Results == false) || 
(Results["Error_Number"] != ""))
{

$("Ajax_Processing_1").setStyle({visibility: "hidden"});
$("Submit_1").enable();
}
}
});


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread Colin Mollenhour

Man this is getting annoying.. I wish json.org would change their code
or Prototype would use $H().each in setRequestHeaders or both
(preferable) would happen soon. This is popping up on Rails Spinoffs
at least twice a day it seems.

> You included the new JSON library from json.org? That is what broke
> Prototype.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread Mislav Marohnić
On 2/23/07, RFLudwick <[EMAIL PROTECTED]> wrote:
>
>
> Any ideas?


You included the new JSON library from json.org? That is what broke
Prototype.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---