innerText Does Not Work on FireFox – JavaScript
If you happen to try use the JavaScript property innerText on an element you wont get it work with FireFox browser.
The reason is FireFox does not have a property innerText, rather they use a property called textContent.
There are many ways to solve this problem.
Option 1:
Use JQuery.
Example:
$(document).ready(function() {
$(‘myElementId’).text(“My Text or Whatever”);
});
Option 2:
Create a JavaScript function, and call it when you need.
function ChangeContent(elem, content) {
if (document.all)
elem.innerText = content;
else
elem.textContent = content;
}
There are many other ways as well.
____________________
From Webcosmo Webmaster Forum http://www.webcosmoforums.com/javascript-ajax/26917-innertext-does-not-work-firefox.html










Leave your response!