[Rails-spinoffs] character encoding in ajax submit

2006-04-14 Thread Rahul Bhargava
Hey all,   Anyone got some quick advice on international character submission via Prototype’s Form.Serialize?    The base scenario: I set the charset on my page to ISO-8859-1, which seems to be what everyone uses.  If I submit a regular form with a standard webpage, I get internationa

[Rails-spinoffs] refreshing JS libraries on client?

2006-03-31 Thread Rahul Bhargava
Hi folks,   So I’ve got this app built on prototype, with a bunch of extra JS classes to do what we want.  Now the problem is, when I make a change to one of those JS files (or an upgrade to prototype itself), how do I ensure that the client browsers refresh their cache with the latest JS

RE: [Rails-spinoffs] browser-crash with Ajax.Updater

2006-02-28 Thread Rahul Bhargava
This might be the "var" bug from a while ago. Get rid of any "var" keywords in the html being returned and then it should stop crashing things. Or patch your prototype's evalScripts method. http://dev.rubyonrails.org/ticket/3288 rahul -Original Message- From: [EMAIL PROTECTED] [mailto:

RE: [Rails-spinoffs] Position.clone() duplicate

2006-01-27 Thread Rahul Bhargava
PROTECTED] On Behalf Of Rahul Bhargava Sent: Friday, January 27, 2006 11:29 AM To: rails-spinoffs@lists.rubyonrails.org Subject: [Rails-spinoffs] Position.clone() duplicate   Haven’t seen anyone ask about this yet… why are there 2 Position.clone() methods in Prototype.js?  It seems that the

[Rails-spinoffs] Position.clone() duplicate

2006-01-27 Thread Rahul Bhargava
Haven’t seen anyone ask about this yet… why are there 2 Position.clone() methods in Prototype.js?  It seems that the second would overwrite the first, and the second has lots more options.  Am I missing something?   Thanks,   rahul ___

RE: [Rails-spinoffs] Sudden Javascript Console noise in firefox

2005-12-28 Thread Rahul Bhargava
Yeah, The CSS debug message are nice, but you probably want to install this console replacement:   http://forums.mozillazine.org/viewtopic.php?t=318102   Very useful.   rahul   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Peiris Sent: Wednesday, Dece

RE: [Rails-spinoffs] Re: possible opera+prototype bug in evalscripts?

2005-12-22 Thread Rahul Bhargava
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Duane Johnson Sent: Thursday, December 22, 2005 3:26 PM To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] Re: possible opera+prototype bug in evalscripts?   On Dec 19, 2005, at 11:00 AM, Rahul Bhargava wrote:   Oh

RE: [Rails-spinoffs] Re: possible opera+prototype bug in evalscripts?

2005-12-19 Thread Rahul Bhargava
ide of any function.   Tom     On 19 Dec 2005, at 14:55, Rahul Bhargava wrote:   Hmm… I had firefox crashing on me, but it fixed when I took out any declarations in my code that had a “var” in them. So while this used to work for me:   var  blah = ‘fdsaf’; Now

RE: [Rails-spinoffs] Re: possible opera+prototype bug in evalscripts?

2005-12-19 Thread Rahul Bhargava
9 Dec 2005, at 14:55, Rahul Bhargava wrote:   Hmm… I had firefox crashing on me, but it fixed when I took out any declarations in my code that had a “var” in them. So while this used to work for me:   var  blah = ‘fdsaf’; Now that makes firefox crash, so I changed it to this:   bl

RE: [Rails-spinoffs] Re: possible opera+prototype bug in evalscripts?

2005-12-19 Thread Rahul Bhargava
  Hmm… I had firefox crashing on me, but it fixed when I took out any declarations in my code that had a “var” in them. So while this used to work for me:   var  blah = ‘fdsaf’; Now that makes firefox crash, so I changed it to this:   blah = ‘fdaf’; and that worked fine.   I’ll try

RE: [Rails-spinoffs] Observing Ajax Requests?

2005-12-19 Thread Rahul Bhargava
Oh neat, I hadn't noticed that either... I'd implemented something similar, as I'm sure many others have, but as my own wrapper around the Ajax.Request and Ajax.Updater calls. The only interaction issue I wanted to raise was that for Ajax.Updater calls it might make sense to be able to get the n

[Rails-spinoffs] ff 1.5 / xml status problem

2005-12-07 Thread Rahul Bhargava
Hi all,   Are other people having the ff 1.5 problem with Ajax.Request.responseIsSuccess?  Didn’t see any emails fly by on this so I thought I’d ask.   Firefox is crashing on me when inside of that method due to the attempt to access this.transport.status.  Apparently it doesn’t like do

RE: [Rails-spinoffs] Problem passing event object

2005-10-28 Thread Rahul Bhargava
quot; at the end. I know I tried this.switchPrompt(evt) at one point, and instead of pointing the switchPrompt method to be fired onSuccess, it just always fired it automatically - because it had the parenthases at the end. Thanks for the other thoughts as well, I implemented both of them, j

RE: [Rails-spinoffs] Problem passing event object

2005-10-27 Thread Rahul Bhargava
A few thoughts : 1) You need to bind the object to get it to work: onSuccess: this.switchPrompt.bind(this), onFailure: this.dontCheck.bind(this) that will fake out Javascript and set up the "this" reference to work correctly for you I think. 2) On another note, I've noticed that it's appropri

RE: [Rails-spinoffs] InPlaceEditor scrolls to top in Firefox?

2005-10-26 Thread Rahul Bhargava
o the top do you? How shall we work around this? Conditionally > > not do the focus if we're on Firefox? Isn't that really ugly? Ideas? > > > > On 10/27/05, Jay Levitt <[EMAIL PROTECTED]> wrote: > > > >> Rahul Bhargava wrote: > >> > &g

RE: [Rails-spinoffs] InPlaceEditor scrolls to top in Firefox?

2005-10-26 Thread Rahul Bhargava
ls to top in Firefox? Unfortunately this fix doesn't seem to work at all. :-( The code was already stopping the event and even when I return false from the function it still scrolls to the top. We're back to square one. :-( Cheers, Jon On 10/26/05, Jon Tirsen <[EMAIL PROTECTED]> wrote

RE: [Rails-spinoffs] InPlaceEditor scrolls to top in Firefox?

2005-10-25 Thread Rahul Bhargava
Yeah, it looks like the enterEditMode method needs to add two things:   1) have an argument so that the event can be passed into the method (this is what bindAsEventListener lets you do)   enterEditMode: function(evt) {   2) probably as the last thing in the method, it should do this:

RE: [Rails-spinoffs] responseText Vs responseXML

2005-10-18 Thread Rahul Bhargava
Well, it sort of depends on your server I think. Many will look at the ".rss" and set some content-type based on that automatically before sending it back to the client (your ajax call). If you have a script returning the rss on the server, then you need to make a call to set the content type yo

RE: [Rails-spinoffs] responseText Vs responseXML

2005-10-18 Thread Rahul Bhargava
I think the response needs to come back from the server with a content-type of text/xml (rather than text/html) in order to fill in the responseXML for you. You can't use getElementsByTagName with responseText because it is just text, not a parsed and loaded DOM tree. Hope that helps... rahul