Calling inner frame function from an outer frame

Posted: Thursday, August 12, 2010 by Venkat Pola in Labels:
0

d = document;
f = d.frames ? d.frames[inner_frame_id] : d.getElementById(inner_frame_id);
if (f != undefined && f != null)
{
if (f.inner_frame_function_name)
{
// Calling inner frame function
f.inner_frame_function_name();
}
else
{
if (f.contentWindow.inner_frame_function_name)
{
// Calling inner frame function
f.inner_frame_function_name();
}
else
{
// Function was denfined in inner frame
}
}
}else{
//Inner frame was not found
}

0 comments: