caffeinerusher
Programmer
Hi,
I have a link on a page with a declared class and a declared ID. There is a rollover on this link that calls a javascript function. The ID of the link is passed to the function. Using this value, I need to access the className of that link. For instance.. theID is the value of the ID passed from the link. linkID is the actual value of the ID.
function test(theID) {
alert(linkID.className);
alert(theID);
}
If I call this function on a mouseover, it gives me the className of the link and gives me the value of the ID (linkID). The problem is that I do not want to have to hardcode the name of ID in the function I need it to take the ID value and plug it in. theID.classname does not work. Please Help
--Caffeinerusher
I have a link on a page with a declared class and a declared ID. There is a rollover on this link that calls a javascript function. The ID of the link is passed to the function. Using this value, I need to access the className of that link. For instance.. theID is the value of the ID passed from the link. linkID is the actual value of the ID.
function test(theID) {
alert(linkID.className);
alert(theID);
}
If I call this function on a mouseover, it gives me the className of the link and gives me the value of the ID (linkID). The problem is that I do not want to have to hardcode the name of ID in the function I need it to take the ID value and plug it in. theID.classname does not work. Please Help
--Caffeinerusher