XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 1st, 2003, 01:57 PM
sn0mm1s sn0mm1s is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 sn0mm1s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XML Newline question.

I have a string with newlines embedded into it. I am trying to display the string but the newlines are ignored. I have attempted to write a javascript function that parses the string and prints <BR> for every newline. However, me code is not working, any help would be appreciated.

Here is my javascript fxn and how I am calling it in the xml.

<SCRIPT LANGUAGE="JavaScript" type="text/javascript" charset="utf-8">

<![CDATA[
function NoteFormat(NoteText)
{
var ParsedNoteArray = NoteText.split(/\n/);
for (i=0; i<ParsedNoteArray.length; i++)
{
document.write(ParsedNoteArray[i] + "<br>");
}
}
]]>
</SCRIPT>


<a href="javascript:NoteFormat({@Note})"></a>

Reply With Quote
  #2  
Old August 5th, 2003, 05:47 PM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
Try doing a search in the forum first before posting a message. This topic has been covered from many different angles.

http://forums.devshed.com/t68602/s.html
http://forums.devshed.com/t63328/s.html
__________________
mr...

mike.rusaw@realpage.com
RalPage, Inc.

"I have made this letter longer than usual, only because I have not had the time to make it shorter." - Blaise Paschal

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML Newline question.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway