rahul aggarwal
rahul aggarwal

Reputation: 265

document.all[test].innerHTML not working in Firefox

I am trying

 function ddtip(thetest, thetext)

var Test = document.all[thetest].innerHTML;

var str = document.all[thetext].value;
var MyArray = str.split(",");

but it is not working in Firefox but the same is working in IE. thetest and thetext are the ID of the Server Controls.

I also tried with document.getElementById[thetest].innerHTML; but it is throwing error.

Please Help.

Thanks,

Rahul

Upvotes: 0

Views: 664

Answers (1)

Kees
Kees

Reputation: 1418

If "thetest" is a variable then getElementById should work. If it is the id of the element you are looking for then it should be like this: document.getElementById('thetest')

Upvotes: 1

Related Questions