workmode1
Programmer
- Oct 28, 2008
- 4
Hello,
I have created a website where the iframe content calls a function on the parent to display data on the main page. I have tried top.functionCall(), parent.functionCall(), and a number of other permutation and I get the same result on Safari.
The specific error is:
Value Undefined (result of expression parent.setPopup) is not an object.
This works in Firefox (Win and Mac), Google, IE, and Opera, but not at all in Safari. I can not think of a work around. Any suggestions?
The site is The specific page is listed on the bottom menu as Mantelscapes. It popups up an iframe with the following call :
<a href="javascript:void(0);" onclick="top.setPopup(1);"><img...></a>
The function I am calling is as follows (it is listed on the Parent page):
function setPopup(popup_number) {
var popup1 = document.getElementById("popup1");
var popup2 = document.getElementById("popup2");
var popup3 = document.getElementById("popup3");
var popup4 = document.getElementById("popup4");
var popup5 = document.getElementById("popup5");
var popup6 = document.getElementById("popup6");
var popup7 = document.getElementById("popup7");
var popup8 = document.getElementById("popup8");
popup1.style.display = "none";
popup2.style.display = "none";
popup3.style.display = "none";
popup4.style.display = "none";
popup5.style.display = "none";
popup6.style.display = "none";
popup7.style.display = "none";
popup8.style.display = "none";
if (popup_number == 1) {
popup1.style.display = "inline";
}
else if (popup_number == 2) {
popup2.style.display = "inline";
}
else if (popup_number == 3) {
popup3.style.display = "inline";
}
else if (popup_number == 4) {
popup4.style.display = "inline";
}
else if (popup_number == 5) {
popup5.style.display = "inline";
}
else if (popup_number == 6) {
popup6.style.display = "inline";
}
else if (popup_number == 7) {
popup7.style.display = "inline";
}
else if (popup_number == 8) {
popup8.style.display = "inline";
}
return true;
}
I would love a solution that fits my design, but I will take all suggesions. Thank you in advance.
I have created a website where the iframe content calls a function on the parent to display data on the main page. I have tried top.functionCall(), parent.functionCall(), and a number of other permutation and I get the same result on Safari.
The specific error is:
Value Undefined (result of expression parent.setPopup) is not an object.
This works in Firefox (Win and Mac), Google, IE, and Opera, but not at all in Safari. I can not think of a work around. Any suggestions?
The site is The specific page is listed on the bottom menu as Mantelscapes. It popups up an iframe with the following call :
<a href="javascript:void(0);" onclick="top.setPopup(1);"><img...></a>
The function I am calling is as follows (it is listed on the Parent page):
function setPopup(popup_number) {
var popup1 = document.getElementById("popup1");
var popup2 = document.getElementById("popup2");
var popup3 = document.getElementById("popup3");
var popup4 = document.getElementById("popup4");
var popup5 = document.getElementById("popup5");
var popup6 = document.getElementById("popup6");
var popup7 = document.getElementById("popup7");
var popup8 = document.getElementById("popup8");
popup1.style.display = "none";
popup2.style.display = "none";
popup3.style.display = "none";
popup4.style.display = "none";
popup5.style.display = "none";
popup6.style.display = "none";
popup7.style.display = "none";
popup8.style.display = "none";
if (popup_number == 1) {
popup1.style.display = "inline";
}
else if (popup_number == 2) {
popup2.style.display = "inline";
}
else if (popup_number == 3) {
popup3.style.display = "inline";
}
else if (popup_number == 4) {
popup4.style.display = "inline";
}
else if (popup_number == 5) {
popup5.style.display = "inline";
}
else if (popup_number == 6) {
popup6.style.display = "inline";
}
else if (popup_number == 7) {
popup7.style.display = "inline";
}
else if (popup_number == 8) {
popup8.style.display = "inline";
}
return true;
}
I would love a solution that fits my design, but I will take all suggesions. Thank you in advance.