For error reporting purposes, I''d like to take the data returned from an Ajax call, which should contain HTML, and display that HTML in an error reporting page. Does prototype.js have a method which will convert an HTML string to display format? Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Depends what you mean. A good place to check for functionality in prototype is http://www.sergiopereira.com/articles/prototype.js.html You can go there and search to see if it has the functionality you want. Cheers -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Sam Sent: Monday, July 10, 2006 2:00 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Making HTML display-able on a page For error reporting purposes, I''d like to take the data returned from an Ajax call, which should contain HTML, and display that HTML in an error reporting page. Does prototype.js have a method which will convert an HTML string to display format? Sam
have a look at the method escapeHTML() of String objects. for example: $(''mydiv'').innerHTML = request.responseText.escapeHTML(); hth On 7/10/06, Bauser, Joseph (Joe) <Joseph.Bauser-9sMr025MA47QT0dZR+AlfA@public.gmane.org> wrote:> > Depends what you mean. > A good place to check for functionality in prototype is > http://www.sergiopereira.com/articles/prototype.js.html > You can go there and search to see if it has the functionality you want. > > Cheers > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: > rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Sam > Sent: Monday, July 10, 2006 2:00 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Making HTML display-able on a page > > > For error reporting purposes, I''d like to take the data returned from an > Ajax call, which should contain HTML, and display that HTML in an error > reporting page. > > Does prototype.js have a method which will convert an HTML string to > display format? > > Sam > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Mit freundlichen Grüßen Siegfried Puchbauer _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
If you need this for debugging/dev purposes rather than production/ user-based error reports, just install firebug[1] and you''ll see each and every ajax call in glorious detail. :) -Thomas [1] http://www.joehewitt.com/software/firebug/ Am 11.07.2006 um 10:01 schrieb Siegfried Puchbauer:> have a look at the method escapeHTML() of String objects. > > for example: > > $(''mydiv'').innerHTML = request.responseText.escapeHTML(); > > hth > > On 7/10/06, Bauser, Joseph (Joe) <Joseph.Bauser-9sMr025MA47QT0dZR+AlfA@public.gmane.org> wrote: > Depends what you mean. > A good place to check for functionality in prototype is http:// > www.sergiopereira.com/articles/prototype.js.html > You can go there and search to see if it has the functionality you > want. > > Cheers > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: rails- > spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Sam > Sent: Monday, July 10, 2006 2:00 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Making HTML display-able on a page > > > For error reporting purposes, I''d like to take the data returned > from an Ajax call, which should contain HTML, and display that HTML > in an error reporting page. > > Does prototype.js have a method which will convert an HTML string > to display format? > > Sam > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > -- > Mit freundlichen Grüßen > > Siegfried Puchbauer > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs-- Thomas Fuchs wollzelle http://www.wollzelle.com questentier on AIM madrobby on irc.freenode.net http://www.fluxiom.com :: online digital asset management http://script.aculo.us :: Web 2.0 JavaScript http://mir.aculo.us :: Where no web developer has gone before _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Oh, plus you can do some seriours jiggery-pokery by using posting back the current browser DOM to the server to log HTML update errors by issuing a "silent" Ajax call with the .innerHTML property of the BODY element as POST data. -Thomas Am 11.07.2006 um 10:01 schrieb Siegfried Puchbauer:> have a look at the method escapeHTML() of String objects. > > for example: > > $(''mydiv'').innerHTML = request.responseText.escapeHTML(); > > hth > > On 7/10/06, Bauser, Joseph (Joe) <Joseph.Bauser-9sMr025MA47QT0dZR+AlfA@public.gmane.org> wrote: > Depends what you mean. > A good place to check for functionality in prototype is http:// > www.sergiopereira.com/articles/prototype.js.html > You can go there and search to see if it has the functionality you > want. > > Cheers > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto: rails- > spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Sam > Sent: Monday, July 10, 2006 2:00 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] Making HTML display-able on a page > > > For error reporting purposes, I''d like to take the data returned > from an Ajax call, which should contain HTML, and display that HTML > in an error reporting page. > > Does prototype.js have a method which will convert an HTML string > to display format? > > Sam > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > -- > Mit freundlichen Grüßen > > Siegfried Puchbauer > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs-- Thomas Fuchs wollzelle http://www.wollzelle.com questentier on AIM madrobby on irc.freenode.net http://www.fluxiom.com :: online digital asset management http://script.aculo.us :: Web 2.0 JavaScript http://mir.aculo.us :: Where no web developer has gone before _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs