if i get the infomation from an xml file and display it in a textfield…
how can i represent a breakline in the xml file so that the textfield also have a new line?
<event title="Finally" description="test1" + "
" + "test2" />
lets say this is the code
is this correct?
will the textfield show a newline?
[edited]
just a note that is part of a code from the xml file which i want the textfield to get information from
will the description appears as i want?
eg
test1
test2
hmmz am i rite to say that xml wont allow me to do that?
cos i manage to get round this only by recoding the AS and the structure the XML file is…
just
<**event title=“Finally” description=“test1
test2” />
senocular: this is not working
here is my xml file codes
<events startDate="2003-01-01" endDate="2004-12-31">
<event title="Test Event 1" description="once on 10 february" startDate="2003-02-10 17:30:00" endDate="2003-02-10 19:30:00" allDay="0" eventType="once" />
</events>
here is my AS to display it in a textfield called events_txt
calendar_mc.onDisplayEvent = function (eventsData,dateObj) {
var output_str;
var c = events_txt;
c.htmlText = "";
for (var i=0; i<eventsData.length; i++) {
output_str += + dateObj+ "
";
output_str += eventsData*.title + "
";
output_str += eventsData*.description + "
";
}
c.htmlText += output_str;
}
when i use what u tell me
description=“test1
test2”
it doesnt show it as
test1
test2
but it is shown as test1
test2
or am i still doing something wrong?
i edited the xml file to give description childNodes to have different paragraphs then edit the AS to detect the number of childNodes and show the paragraphs respectively…
u can go to
http://slog.nisausdx.net/blog.swf
to see the feb 28 entry to see what i want…
oh… thanks for the help! If there is something that i could have done instead please let me know…
if you are using HTML text, use <**br> instead
like this
description=“test1<-br->test2”
or
description=“test1” + <-br-> + “test2”
i tried both method and it is not working
wont even load the xml file properly
well since you’re doing it from within an xml attribute, youd use this
&**lt;br&**gt;
otherwise the tags will screw with the xml formatting.
where were the <- and -> coming from?
oh the <- and -> is because i dun want to use the php codes…
hehe it is br without the -'s
wat is lt,br and gt?
br is break?
lt? line terminate?
oh and is it possible to make bold words in xml attributes?
where can i find more of such codes?
&**lt; and &**gt; are html for Less Than (lt) and Greater Than (gt) just like a hard nonbreaking space &**nbsp;
&**lt;br&**gt; is just <**br> without messing with the xml