By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

problem with createTextNode

P: 77
Hello..i have this script

Expand|Select|Wrap|Line Numbers
  1. var span = document.createElement('span');
  2. var theData = document.createTextNode('Location Code');
  3. span.appendChild(theData);
  4. label.appendChild(span);
  5.  
the text node is works well in Firefox, but in IE, it doesn't show up...

any idea please??thanks
Jul 17 '08 #1
Share this Question
Share on Google+
4 Replies


gits
Expert Mod 5K+
P: 5,343
i'm not aware of such a problem with IE - i think it should work ... could you post how you refer the label-node where the span should be appended? to check whether the reference is correct or not you could just try to set the innerHTML of the label-node ... when something appears the reference is correct, and we should have a look at it in more detail ...

kind regards
Jul 17 '08 #2

P: 77
i'm not aware of such a problem with IE - i think it should work ... could you post how you refer the label-node where the span should be appended? to check whether the reference is correct or not you could just try to set the innerHTML of the label-node ... when something appears the reference is correct, and we should have a look at it in more detail ...

kind regards

but how??i'm a newbie in javascript, can you give me an example??

thanks
Jul 18 '08 #3

dmjpro
100+
P: 2,476
How you could get the label node?
Jul 18 '08 #4

acoder
Expert Mod 15k+
P: 16,027
but how??i'm a newbie in javascript, can you give me an example??
You forgot the first part where he asked for the rest of the code.
Jul 18 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.