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


innerText problems

Reply
  #1 (permalink)  
Old 11-24-09, 02:32 PM
jonnekke jonnekke is offline
Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 704
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-25-09, 04:48 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Try innerHTML.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-25-09, 04:21 PM
jonnekke jonnekke is offline
Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 704
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..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-26-09, 04:20 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Yes! It has better cross-browser support than some official DOM methods.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
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-16-09 12:31 AM
Problems with event binding eddiefisher41 HTML/XHTML/XML 5 03-10-09 01:36 AM
Excel Problems Using VMWare DarleneMiles New Members & Introductions 0 02-20-09 11:38 AM
Password Problems in VB6 iceiceady Visual Basic 6 03-28-06 04:17 PM
2 spacing/alignment problems Arowana HTML/XHTML/XML 0 01-07-04 12:58 PM


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