?
Solved

innertext alternative

Posted on 2003-02-22
9
Medium Priority
?
214 Views
Last Modified: 2008-01-16
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
Comment
Question by:bziherl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 200 total points
ID: 7999434
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
 
LVL 5

Expert Comment

by:cirtap
ID: 7999461
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
 
LVL 12

Expert Comment

by:ahosang
ID: 7999797
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:bziherl
ID: 7999907
Oh, yes my mistake, I meant innerText...excuse me.
0
 

Expert Comment

by:reubenbell
ID: 8000426
no.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8000511
Geez ... I wish I could learn to use a keyboard with out typos :^(

document.getElementById("theid").innderHTML


SB:

document.getElementById("theid").innerHTML


Cd&
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10083203
*******************************************************
******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
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 10084082
:^)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question