• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AJAX Callback Fails when it Contains Formating

 
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using jQuery to do an AJAX call with callback. When I try to add formating to the return string in my java class by adding a "\r\n" the callback fails(I get no return string). If I remove the "\r\n" it works ok. I was tring to avoid having to use javascript to format the string.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be using HTML to format your string, since you are rendering HTML after all. It only there was an HTML way of performing a line break.
 
Steve Dyke
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gregg Bolinger wrote:You should be using HTML to format your string, since you are rendering HTML after all. It only there was an HTML way of performing a line break.



Thanks for the help. The trick is I need the string broke in specific places to match the original format when it was input by the user and stored. I went back to substituting the line breaks with ^ and using js to replace this character when page is rendered.
 
reply
    Bookmark Topic Watch Topic
  • New Topic