0

I create one web page (which display details in table) using html & js. Which works on firefox but not in IE.

function frontEnd() 
{
try{
th1 = document.getElementById('th1');
th1.firstChild.nodeValue = "Technology";
th2 = document.getElementById('th2');
th2.firstChild.nodeValue = "Level of knowledge";
t1 = document.getElementById('t1');
t1.firstChild.nodeValue = "HTML";
tl1 = document.getElementById('tl1');
tl1.firstChild.nodeValue = "5";
document.getElementById('MyTab').style.visibility="visible";
}
catch(e)
{
alert(e);
}
 }

th1 is an id of table heading, t1,tl1 are data id. Actually am trying to display static values in table when user clicks button. It works sucessfully in firefox, not in IE. When click button using IE it reflects an error "[Object Error]" Please tel me how to made the same code to work in IE.

Thanks, Naveen

darioo
47.4k10 gold badges79 silver badges104 bronze badges
asked Jan 19, 2011 at 10:09

1 Answer 1

2

Why don't you use JQuery or Prototype JavaScript library , they are cross browser compatible.

Jquery

http://api.jquery.com/first-child-selector/

answered Jan 19, 2011 at 10:13
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.