Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

outerText property not working in Javascript

Posted on 2008-10-02
4
Medium Priority
?
1,248 Views
Last Modified: 2012-06-27
outerText property works in Internet Explorer but does not work in Firefox. How to get it working in Firefox...what is the alernative in Javascript for Firefox...
0
Comment
Question by:intikhabk
[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
  • 2
4 Comments
 
LVL 82

Expert Comment

by:hielo
ID: 22627174
>>outerText property works in Internet Explorer
Because it is an IE property only. It is NOT a "standard" property. Instead of:
obj.outerText

try:
obj.parentNode.innerHTML
0
 

Author Comment

by:intikhabk
ID: 22627219
suppose i have a table
like
<table>
 <tr>
    <td>test1</td>
    <td>test2</td
 </tr>
</table>

how do i get test1 ...i nead a javascript code which will work in IE as well as Firefox
0
 
LVL 82

Accepted Solution

by:
hielo earned 1500 total points
ID: 22627271
give your td an id:

<table>
 <tr>
    <td id="c1">test1</td>
    <td>test2</td
 </tr>
</table>
 
then use:
document.getElementById("c1").innerHTML

Open in new window

0
 
LVL 1

Expert Comment

by:raajbaid
ID: 33169323
u people r really very good! hats off boss.
I have been wandering since hours for solution to this problem, and i was sure that i will get solution of my problem here only but i could not get any suggestion in search list of your site.

finally i got it!

thanks!
god is great
besides other reasons "coz he made u"
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…
Suggested Courses

609 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