[Proto-Scripty] Re: Observer and Firefox

2010-08-10 Thread steve
Hi T.J. Thanks for the response. I will have a closer look at your examples later and see which may suit best. Why I don't want to remove event handles - I have tried this and I (currently) seem to have a issue with JavaScript variable scope somewhere in my code. I haven't got around to fixing

[Proto-Scripty] Scriptaculous Effect.multiple

2010-08-10 Thread noit
Sometimes the array i have includes only one element and i dont want Effect.multiple to run the effect on its child nodes but just on the element. Right now i am currently checking if its one element then if it is i run the effect on it alone otherwise i send it to multiple. But i was wondering

Re: [Proto-Scripty] Re: How do I get updater onSuccess response to function()

2010-08-10 Thread Phil Petree
T.J., Thanks for that... my confusion came in trying to declare the onSuccess or onFailure functions with the transport parameter... I had no idea that 'transport' would be passed regardless... once that was cleared up, it seems to be working fine! On Sun, Aug 8, 2010 at 4:23 AM, T.J. Crowder

[Proto-Scripty] Best way to determine error codes

2010-08-10 Thread Phil Petree
When using the updater / onFailure event, what is the best way to determine what the actual error is? What I came up with was this: function ajax_err(transport) { alert(An AJAX error occurred: +transport.statusText); } But it seems like its not detailed enough... -- You received this

[Proto-Scripty] Re: How do I get updater onSuccess response to function()

2010-08-10 Thread T.J. Crowder
Hi, ...onFailure functions with the transport parameter... I had no idea that 'transport' would be passed regardless... I have to admit that I don't follow you there. I did use the name 'response' rather than 'transport' in my examples (transport in some Prototype examples is a 1.5 and earlier

[Proto-Scripty] Re: Best way to determine error codes

2010-08-10 Thread T.J. Crowder
Hi, There's also the status attribute[1], which is the HTTP status code for the failure. Some servers may provide more information in the responseText, but you can't rely on that and the formats vary so dramatically that parsing it is a pain... [1]

[Proto-Scripty] Ajax request on anchor onclick is buggy in Safari

2010-08-10 Thread JoJo
I'm collecting stats on user clicking behavior. In this example, I write an entry into the database whenever someone clicks a link that starts a download: a href=program.exe onclick=logClick()download program/a function logClick() { new Ajax.Request( '/logger.php?action=1' ); } This

[Proto-Scripty] Re: Ajax request on anchor onclick is buggy in Safari

2010-08-10 Thread Fabien Ménager
Your method seems really random. You should proceed differently. Imagine the user has JS disabled, it's click won't be logged, you should use a server side script that will log the click and redirect the user to the desired file : href=dispatcher.php?file=program.exe If you don't have access to

[Proto-Scripty] Re: Ajax request on anchor onclick is buggy in Safari

2010-08-10 Thread T.J. Crowder
Hi, By default, Ajax.Request is *asynchronous*. I'm surprised, frankly, that you're seeing many database updates at all, regardless of the browser, since a request may not have been transmitted before the page gets torn down to make way for the new one. I wouldn't expect it to be reliable. If

[Proto-Scripty] Re: IE 8 Error: The data necessary to complete this operation is not yet available.

2010-08-10 Thread KammylandSoftware
I found the solution, actually. As it happens IE 6 has a payload length limit when using the GET method. As it just so happens, I was in fact using the GET method to send some parameter data to the server in an ajax request (using prototype). Hence, the ajax request would not go through; then,

[Proto-Scripty] Re: IE 8 Error: The data necessary to complete this operation is not yet available

2010-08-10 Thread KammylandSoftware
I found the solution, actually. As it happens IE 6 has a payload length limit when using the GET method. As it just so happens, I was in fact using the GET method to send some parameter data to the server in an ajax request (using prototype). Hence, the ajax request would not go through; then,

[Proto-Scripty] Re: IE 8 Error: The data necessary to complete this operation is not yet available

2010-08-10 Thread KammylandSoftware
I found the solution, actually. As it happens IE 6 has a payload length limit when using the GET method. As it just so happens, I was in fact using the GET method to send some parameter data to the server in an ajax request (using prototype). Hence, the ajax request would not go through; then,