redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers

Ask your IT question here

how to make p str to be evaluated as html tag


Goto page Previous  1, 2
 
Post new topic   Reply to topic    Programming Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
kadamat
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 88
Roombor, will it work if add it later to var txt = document.createTextNode(str); ?
I mean is it valid to add object as input for TextNode ?

Reply with quote
 
Roombor
Enthusiastic Coder


Joined: 02 Jun 2006
Posts: 111
kadamat, I'm not sure what you mean.
A text node is just something which contains a bunch of text. So the argument for createTextNode is always a string.
If you want to create all sorts of complicated formatting for your string I will grudgingly admit that innerHTML might be better. For example document.addTextNode('This text is <strong>bold</strong>') shouldn't work.

Reply with quote
 
kadamat
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 88
Thankadamat for help
Reply with quote
 
Page 2 of 2 Goto page Previous  1, 2
Post new topic   Reply to topic    Programming Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group