Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

innertext alternative

I would like to get the content of my homepage, which I can do in IE with:

myStr = document.body.innerText;

Of course this doesn't work in Netscape. Is there any other way that I could use?

Thanks,
Blaz
0
bziherl
Asked:
bziherl
1 Solution
 
COBOLdinosaurCommented:
I assume you mean Netscrap 4.x in which case NO.  If you mean Netscrap 6+ and it is not working you probalbly need to give the body an id and then access with:

document.getElementById("theid").innderHTML

Cd&
0
 
cirtapCommented:
What now: innerText or innerHTML?
.innerHTML works fine in NS6 and Opera whereas .innerText does not. Both implemented MSIE's .innerHTML to be "compatible".
Maybe some of the preview releases of NS6 didn't support it yet.

0
 
ahosangCommented:
outerHTML
innerHTML
outerText
innerText
All Microsoft extensions/ideas

ONLY ---> innerHTML was adopted by most other brands including NS 6+
Basically it was so useful, and developers insisted you should be able to change the contents of an element, that it was adopted by even Netscape.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
bziherlAuthor Commented:
Oh, yes my mistake, I meant innerText...excuse me.
0
 
reubenbellCommented:
no.
0
 
COBOLdinosaurCommented:
Geez ... I wish I could learn to use a keyboard with out typos :^(

document.getElementById("theid").innderHTML


SB:

document.getElementById("theid").innerHTML


Cd&
0
 
jaysolomonCommented:
*******************************************************
******PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER******
*******************************************************
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area:
RECOMMENDATION:

 - [Points to Cd& Grade A]

Please leave any comments here within the next seven days.
*******************************************************
******PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER******
*******************************************************

jAy
EE Cleanup Volunteer
0
 
COBOLdinosaurCommented:
:^)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now