| Author |
Ajax display issue
|
trupti nigam
Ranch Hand
Joined: Jun 21, 2001
Posts: 602
|
|
I am new to Ajax. I have done some basic reading from the w3schools. I have a JSP page that needs to display the real time notifications on the JSP page as table row format.
When the new notification is received, I save the object received from notification in a java list.
My problem is I am unable to display the contents of this list on JSP page on each separate like. The list displays as continuous text on the JSP which is not readable. Below is the code.
Trades.jsp
messgae.html
This prints the objects inside the list on the same line one by other.
Any pointers?>
|
 |
Swastik Dey
Ranch Hand
Joined: Jan 08, 2009
Posts: 1196
|
|
|
I guess \n\r is not recognized by html, try appending "<BR>". Correct me if I am wrong.
|
Swastik
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Swastik Dey is correct, to add a new line, you need to use a tag. You may however be better off using something like an unordered list.
Eric
|
 |
trupti nigam
Ranch Hand
Joined: Jun 21, 2001
Posts: 602
|
|
Swastik Dey wrote:I guess \n\r is not recognized by html, try appending "<BR>". Correct me if I am wrong.
I tried with <BR> And it still does not work. The next object in the list gets printed on the same line.
|
 |
Swastik Dey
Ranch Hand
Joined: Jan 08, 2009
Posts: 1196
|
|
|
What does textDoc contain? New line characters or <br>?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56205
|
|
|
If it's a list, why aren't you using a list?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Aren't the new lines you are talking about being added here:
|
 |
trupti nigam
Ranch Hand
Joined: Jun 21, 2001
Posts: 602
|
|
It worked after I added the to the text and not on the html page.
thanks all for the help.
Trupti
|
 |
 |
|
|
subject: Ajax display issue
|
|
|