[TriLUG] javascript syntax

William Sutton william at trilug.org
Mon Mar 21 07:51:33 EST 2005


What you have to remember is that ultimately you are generating html with 
your JavaScript.  It probably is translating your \n's, but as far as your 
browser is concerned, that's just empty whitespace.  One way to test it (I 
think) would be to use <pre> and </pre> instead of your <font> tags in 
combination with your \n's.  it may work, but I don't know since I didn't 
try it and don't have time before work :)

If using pre works, then I would suggest creating a style block and 
adjusting the pre properties with CSS.  I can help with that this evening 
after work if it works for you.

For what it's worth, this sort of knowledge is the sort of thing that 
using Dreamweaver of Front Page doesn't teach.

William

On Mon, 21 Mar 2005, Jim Ray wrote:

> 
> William Sutton wrote:
> 
> >I spent a little time on this this afternoon.  If you 
> >document.write(eval(temp)) then things parse out as html...unfortunately 
> >you then lose the ability to dynamically update things.  It's been a while 
> >since I looked at these things (that is, randomized or sequential 
> >javascript marquees), but my recollection has been that I never found one 
> >I liked for various reasons and that Java applets always seemed to be the 
> >way to go....
> >  
> >
> i'm not in bed with javascript and would be happy to try java applet if 
> anyone has some sample code they want to send my way.  seems like a 
> carriage return line feed is simple enough of a feature.  too bad it 
> doesn't work.  why javascript parses the text strings correctly with \" 
> and not with \n, i'll never know.  the whole script has html tags around 
> it.  it is the stuff in the middle with the text that is a royal booger.
> 



More information about the TriLUG mailing list