Hey all, I''ve noticed that the form_remote_tag and observe_field methods generate javascript that breaks in IE 6/win. It''s surprising that no one else has mentioned this-- I''m writing very basic stuff and using the latest prototype.js (1.2.1). With either observe_field or form_remote_tag, the updating part fails. IE''s error message: Line: 246 Char: 7 Error: Unknown runtime error. Code: 0 URL: ... The remote content does not appear, though the action specified in the tag is called. Reading the javascript, it appears that the error is thrown from this function: updateContent: function() { if (this.options.insertion) { new this.options.insertion(this.container, this.request.transport.responseText); } else { here >>> this.container.innerHTML = this.request.transport.responseText; } if (this.onComplete) { setTimeout((function() {this.onComplete(this.request)}).bind(this), 10); } } The xmlhttprequest stuff used by link_to_remote works, but all the form stuff has problems in IE. The same site works perfectly in Firefox 1.0 on mac, windows, and linux (I haven''t tested any others). Any hints? -- Justin
On 5/19/05, jbd-ARXITx83Qt49fbuuu1rVSg@public.gmane.org <jbd-ARXITx83Qt49fbuuu1rVSg@public.gmane.org> wrote:> Hey all, > > I''ve noticed that the form_remote_tag and observe_field methods > generate javascript that breaks in IE 6/win. > > It''s surprising that no one else has mentioned this-- I''m writing very > basic stuff and using the latest prototype.js (1.2.1). > > With either observe_field or form_remote_tag, the updating part fails. > IE''s error message: > > Line: 246 > Char: 7 > Error: Unknown runtime error. > Code: 0 > URL: ... > > The remote content does not appear, though the action specified in the > tag is called. Reading the javascript, it appears that the error is > thrown from this function: > > updateContent: function() { > if (this.options.insertion) { > new this.options.insertion(this.container, > this.request.transport.responseText); > } else { > here >>> this.container.innerHTML = this.request.transport.responseText; > } > > if (this.onComplete) { > setTimeout((function() {this.onComplete(this.request)}).bind(this), 10); > } > } > > The xmlhttprequest stuff used by link_to_remote works, but all the > form stuff has problems in IE. The same site works perfectly in > Firefox 1.0 on mac, windows, and linux (I haven''t tested any others). > > Any hints? > > -- > JustinThat''s odd because I''m using those same methods and they work fine in IE6. The Effect.Fade/Appear don''t seem to work in IE, however. By not working, I mean it just pauses a bit and then disappears. Apparently the changes to opacity are not reflected. I did some digging and it looks like the syntax is fine. To make things even more fun, I deployed prototype.js in an ASP.Net project, and the actions didn''t even work in Safari. Hmmmm. What element are you updating? I know that element updating is a little funky in Tables and Select boxes IIRC. To keep things easy, keep your updating to DIVs and you should be fine. -- rick http://techno-weenie.net
<jbd@...> writes:> With either observe_field or form_remote_tag, the updating part fails. > IE''s error message:I bet it''s IE''s security settings. I had a similar problem where the same code worked on all browsers except IE. Turned out I had to relax my security settings. Pain in the a**.
On Thu, 19 May 2005, Rick Olson wrote:> On 5/19/05, jbd-ARXITx83Qt49fbuuu1rVSg@public.gmane.org <jbd-ARXITx83Qt49fbuuu1rVSg@public.gmane.org> wrote: >> Hey all, >> >> I''ve noticed that the form_remote_tag and observe_field methods >> generate javascript that breaks in IE 6/win.[snip]>> Any hints? > > That''s odd because I''m using those same methods and they work fine in > IE6. The Effect.Fade/Appear don''t seem to work in IE, however. By > not working, I mean it just pauses a bit and then disappears. > Apparently the changes to opacity are not reflected. I did some > digging and it looks like the syntax is fine. To make things even > more fun, I deployed prototype.js in an ASP.Net project, and the > actions didn''t even work in Safari. Hmmmm. > > What element are you updating? I know that element updating is a > little funky in Tables and Select boxes IIRC. To keep things easy, > keep your updating to DIVs and you should be fine.In both cases, I am indeed updating a table with new TR elements. Changing my syntax from <table id="foo"><%= render_partial_collection ...%></table> to <div id="foo"><%= render_partial_collection ...%></table></div> (and updating the partial to spit out the <table> tag for the first counter value)-- fixed the problems. Thanks! -- Justin
> The Effect.Fade/Appear don''t seem to work in IE, however. By > not working, I mean it just pauses a bit and then disappears. > Apparently the changes to opacity are not reflected. I did some > digging and it looks like the syntax is fine.See the comments on http://dev.rubyonrails.com/ticket/1250 for fixing this. Thomas