I''ve been working on an AJAX search, very similar to the Flickr one in the screencast linked from the main rails page. I''ve been doing my testing in Safari, where everything has worked fine, only to now discover the results of the search action seem disinclined to load in Firefox. I can enter a URL to return the HTML fragment that''s supposed to be dropped into the page: http://localhost:3000/book/search?searchTerm=quicksilver The HTML fragment displays correctly in Safari, but when I try it in Firefox (1.0.4 or 1.5), the page acts like it''s loading for a moment, but then stops without displaying any content. I tried it with "curl" on the command line as well, and it worked fine (once I stripped off the login authentication stuff.) This has me pretty well flummoxed. Has anybody experienced anything similar, or have any ideas on where to further investigate? Thanks in advance, Sean
different browsers handle bad HTML differently. Have you triple checked your HTML validity against an html checker? I have found in some instances i didnt close a <div> tag and one browser was ok with it and another was not. That is usually the case when something works in one browser and not the other. hope that helps. adam On 12/28/05, Sean McMains <sean-jFIuniAw/I7R7s880joybQ@public.gmane.org> wrote:> I''ve been working on an AJAX search, very similar to the Flickr one > in the screencast linked from the main rails page. I''ve been doing my > testing in Safari, where everything has worked fine, only to now > discover the results of the search action seem disinclined to load in > Firefox. I can enter a URL to return the HTML fragment that''s > supposed to be dropped into the page: > > http://localhost:3000/book/search?searchTerm=quicksilver > > The HTML fragment displays correctly in Safari, but when I try it in > Firefox (1.0.4 or 1.5), the page acts like it''s loading for a moment, > but then stops without displaying any content. I tried it with "curl" > on the command line as well, and it worked fine (once I stripped off > the login authentication stuff.) > > This has me pretty well flummoxed. Has anybody experienced anything > similar, or have any ideas on where to further investigate? > > Thanks in advance, > Sean > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Make sure Firefox isn''t reporting any Javascript errors that might help you diagnose the problem. There are also a few extension for Firefox that make it easier to debug markup errors, view the Javascript errors, etc. I use the one from this web site: http://chrispederick.com/work/webdeveloper/ Also hope that helps... dean On 12/28/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> different browsers handle bad HTML differently. Have you triple > checked your HTML validity against an html checker? I have found in > some instances i didnt close a <div> tag and one browser was ok with > it and another was not. That is usually the case when something works > in one browser and not the other. > > hope that helps. > > adam > > On 12/28/05, Sean McMains <sean-jFIuniAw/I7R7s880joybQ@public.gmane.org> wrote: > > I''ve been working on an AJAX search, very similar to the Flickr one > > in the screencast linked from the main rails page. I''ve been doing my > > testing in Safari, where everything has worked fine, only to now > > discover the results of the search action seem disinclined to load in > > Firefox. I can enter a URL to return the HTML fragment that''s > > supposed to be dropped into the page: > > > > http://localhost:3000/book/search?searchTerm=quicksilver > > > > The HTML fragment displays correctly in Safari, but when I try it in > > Firefox (1.0.4 or 1.5), the page acts like it''s loading for a moment, > > but then stops without displaying any content. I tried it with "curl" > > on the command line as well, and it worked fine (once I stripped off > > the login authentication stuff.) > > > > This has me pretty well flummoxed. Has anybody experienced anything > > similar, or have any ideas on where to further investigate? > > > > Thanks in advance, > > Sean > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Dean Wampler http://www.aspectprogramming.com http://www.newaspects.com http://www.contract4j.org
Hi Adam, Thanks for your response! I did find a missing </div> after I first noticed the problem, but it didn''t seem to get any better once I fixed it. :( Do you know of any HTML checkers that will work on incomplete fragments, like what one returns to be shoved into a DIV in response to an AJAX call? Guess I could get the returned text from curl and substitute it into the HTML document manually, but that seems a bit cumbersome and error-prone. Anyway, thanks again for the response. Sean On Dec 28, 2005, at 8:37 PM, rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org wrote:> different browsers handle bad HTML differently. Have you triple > checked your HTML validity against an html checker? I have found in > some instances i didnt close a <div> tag and one browser was ok with > it and another was not. That is usually the case when something works > in one browser and not the other._______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
If it''s a single element fragment[1] then you can pipe it through tidy. You''ll probably get a lot of extra feedback, but sometimes that''s not a bad thing. If you''re using xhtml you can also try xmllint, same caveat as tidy: $ xmllint --noout [file] Corey 1. "<div>...</div>", not "<div>...</div><div>...</div>" On Dec 29, 2005, at 2:20 PM, Sean McMains wrote:> Hi Adam, > > Thanks for your response! I did find a missing </div> after I first > noticed the problem, but it didn''t seem to get any better once I > fixed it. :( > > Do you know of any HTML checkers that will work on incomplete > fragments, like what one returns to be shoved into a DIV in > response to an AJAX call? Guess I could get the returned text from > curl and substitute it into the HTML document manually, but that > seems a bit cumbersome and error-prone. > > Anyway, thanks again for the response. > > Sean > > On Dec 28, 2005, at 8:37 PM, rails-request@lists.rubyonrails.org > wrote: > >> different browsers handle bad HTML differently. Have you triple >> checked your HTML validity against an html checker? I have found in >> some instances i didnt close a <div> tag and one browser was ok with >> it and another was not. That is usually the case when something >> works >> in one browser and not the other. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/railsCorey Jewett cj@syntheticplayground.com
Apparently Analagous Threads
- HTML Fragment not Loading in Firefox; Fine Elsewhere
- Bug with Ajax.Autocompleter in Safari 2.0.3?
- why is the result of expr. Ajax.InPlaceEditor not an object in Safari
- Getting value of form using Ajax (and problems with Safari)
- Re: Ajax.Request: responseText = null in Safari