Im new to Javascript, and im doing a page and im creating a page that has a tab menus.. which each tab are images.
i dont know what to do with the error, it goes something like this:
document.getEle mentById(id) has no properties
heres my code:
function setActiveTab(id )
{
var a = new Array;
a = ("img1", "img2", "img3");
document.getEle mentById(id).sr c = "../images/tab_nowshowing_ gray.jpg";
for(var i = 0; i < a.length; i++)
{
if(a[i] != id){
document.getEle mentById(a[i]).src= "../images/tab_comingsoon_ gray.jpg";
document.getEle mentById(a[i]).src= "../images/tab_nextattract ion_gray.jpg";
}
}
}
---------------------
hope somebody could help me
i dont know what to do with the error, it goes something like this:
document.getEle mentById(id) has no properties
heres my code:
function setActiveTab(id )
{
var a = new Array;
a = ("img1", "img2", "img3");
document.getEle mentById(id).sr c = "../images/tab_nowshowing_ gray.jpg";
for(var i = 0; i < a.length; i++)
{
if(a[i] != id){
document.getEle mentById(a[i]).src= "../images/tab_comingsoon_ gray.jpg";
document.getEle mentById(a[i]).src= "../images/tab_nextattract ion_gray.jpg";
}
}
}
---------------------
hope somebody could help me
Comment