First problem which caught my eyes was using the property
innerText
. The official W3C property is
textContent
; and Mozilla tends to support the standards, unlike IE. Please see:
https://developer.mozilla.org/En/DOM/Node.textContent[
^].
One cross-browser compatibility trick is using both in the following way:
myElement = document.smsform.txt2;
str = myElement.textContent || myElement.innerText;
—SA