Current location: Hot Scripts Forums » General Web Coding » JavaScript » innerText problems


innerText problems

Reply
  #1 (permalink)  
Old 11-24-09, 01:32 PM
jonnekke jonnekke is offline
Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 706
Thanks: 0
Thanked 0 Times in 0 Posts
innerText problems

Hi there,

I got this piece of code:

Code:
klantaanhef_ovz.innerText = val;
klantnaam_ovz.innerText = document.getElementById("klantnaam").value;
klantbedrijf_ovz.innerText = document.getElementById("klantbedrijf").value;
klanttelefoon_ovz.innerText = document.getElementById("klanttelefoon").value;
klantemail_ovz.innerText = document.getElementById("klantemail").value;
Somehow this works in IE and Safari only.
How can I make this cross-browser so it will work in
FireFox too?..

_j
Reply With Quote
  #2 (permalink)  
Old 11-25-09, 03:48 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Try innerHTML.
Reply With Quote
  #3 (permalink)  
Old 11-25-09, 03:21 PM
jonnekke jonnekke is offline
Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 706
Thanks: 0
Thanked 0 Times in 0 Posts
thnx on this..

but is it also IE compatible? I got a MacBook so I can't test on IE right now..
Reply With Quote
  #4 (permalink)  
Old 11-26-09, 03:20 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Yes! It has better cross-browser support than some official DOM methods.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
For Loop and innerText KaiserClaw JavaScript 8 10-15-09 11:31 PM
Problems with event binding eddiefisher41 HTML/XHTML/XML 5 03-10-09 12:36 AM
Excel Problems Using VMWare DarleneMiles New Members & Introductions 0 02-20-09 10:38 AM
Password Problems in VB6 iceiceady Visual Basic 6 03-28-06 03:17 PM
2 spacing/alignment problems Arowana HTML/XHTML/XML 0 01-07-04 11:58 AM


All times are GMT -5. The time now is 01:59 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.