Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get view only element using Javascript from HTML page?

Status
Not open for further replies.

ashpassword

Programmer
Jun 19, 2002
19
IN
For Netscape 6 and above.

I have an HTML page on which I am showing some values which I view only.
From this page I want to get the values through javascript, for that I have written following line of code:
var data=document.getChildren(TxtTxnIdObj).item(0).innerText;

Where "TxtTxnIdObj" is an object.

Any suggestion can u give me for this, may be getChildren is not working in Netscape 6 or above.
But this working fine in IE.
 
ashpassword,

how about

document.getElementById('TxtTxnIdObj').innerText

...though you will have to include the attribute id="TxtTxnIdObj" in the HTML element
======================================

if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top