I have a javascript file which partially goes like this:
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}
This file is in the parent frame of a page with an iframe... I want it to make the change in the iframe but the :
document.getElementsByTagName("link")
always finds the 'link' s in the parent. How can I make it look for the 'link' s in the iframe???
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}
This file is in the parent frame of a page with an iframe... I want it to make the change in the iframe but the :
document.getElementsByTagName("link")
always finds the 'link' s in the parent. How can I make it look for the 'link' s in the iframe???















