What causes the Java Script error 'parent.CatalogBody.document.all(...) is not an object'?
This occurs when using Frames and the Frameset is loaded.
To prevent the error:-
- Locate the file Act_FrameSet.html in the site folder.
- Edit the file with a text editor such as Notepad.
- Find the onload function…
<!-
function onLoad()
.
.
.
}
//-->
- Replace the function with…
<!-
function onLoad()
{
if(window.location.search.length > 0 && actinic_ignored != true)
{
var sEscapedParams = unescape(window.location.search);
sEscapedParams = sEscapedParams.substring(1);
var nTheSplit = sEscapedParams.lastIndexOf('&');
var sThePageUrl = sEscapedParams.substring(0,nTheSplit);
var sTheFrameName = sEscapedParams.substring(nTheSplit+1);
eval("window."+sTheFrameName+".location.replace('"+ sThePageUrl+"')");
}
}
function onLoad2()
{
if(window.location.search.length > 0 && actinic_ignored != true)
{
var sEscapedParams = unescape(window.location.search);
sEscapedParams = sEscapedParams.substring(1);
var nTheSplit = sEscapedParams.lastIndexOf('&');
var sThePageUrl = sEscapedParams.substring(0,nTheSplit);
var sTheFrameName = sEscapedParams.substring(nTheSplit+1);
//Now workaround Microsoft's IE 5.5 Anchor bug
var user_agent = window.navigator.userAgent
var msie55 = user_agent.indexOf ( "MSIE" )
if ( msie55 > 0 && sThePageUrl.indexOf("#") != -1)
{
var sTheAnchorName = sThePageUrl.substring (sThePageUrl.indexOf("#")+1, sThePageUrl.length);
if (eval("window."+sTheFrameName+".document.anchors[sTheAnchorName]"))
{
parent.CatalogBody.document.all(sTheAnchorName).scrollIntoView();
}
}
}
}
//-->
- Replace the line…
<FRAME SRC="NETQUOTEVAR:CATALOGBODY" scrolling=auto marginwidth=0 marginheight=0 name=CatalogBody>
- With…
<FRAME SRC="NETQUOTEVAR:CATALOGBODY" scrolling=auto marginwidth=0 marginheight=0 name=CatalogBody onLoad='onLoad2();'>
- Save and exit.
Update the site.
This is a legacy article and is intended for use with version 7 of the software and earlier
This occurs when using Frames and the Frameset is loaded.
To prevent the error:-
- Locate the file Act_FrameSet.html in the site folder.
- Edit the file with a text editor such as Notepad.
- Find the onload function…
<!-
function onLoad()
.
.
.
}
//-->
- Replace the function with…
<!-
function onLoad()
{
if(window.location.search.length > 0 && actinic_ignored != true)
{
var sEscapedParams = unescape(window.location.search);
sEscapedParams = sEscapedParams.substring(1);
var nTheSplit = sEscapedParams.lastIndexOf('&');
var sThePageUrl = sEscapedParams.substring(0,nTheSplit);
var sTheFrameName = sEscapedParams.substring(nTheSplit+1);
eval("window."+sTheFrameName+".location.replace('"+ sThePageUrl+"')");
}
}
function onLoad2()
{
if(window.location.search.length > 0 && actinic_ignored != true)
{
var sEscapedParams = unescape(window.location.search);
sEscapedParams = sEscapedParams.substring(1);
var nTheSplit = sEscapedParams.lastIndexOf('&');
var sThePageUrl = sEscapedParams.substring(0,nTheSplit);
var sTheFrameName = sEscapedParams.substring(nTheSplit+1);
//Now workaround Microsoft's IE 5.5 Anchor bug
var user_agent = window.navigator.userAgent
var msie55 = user_agent.indexOf ( "MSIE" )
if ( msie55 > 0 && sThePageUrl.indexOf("#") != -1)
{
var sTheAnchorName = sThePageUrl.substring (sThePageUrl.indexOf("#")+1, sThePageUrl.length);
if (eval("window."+sTheFrameName+".document.anchors[sTheAnchorName]"))
{
parent.CatalogBody.document.all(sTheAnchorName).scrollIntoView();
}
}
}
}
//-->
- Replace the line…
<FRAME SRC="NETQUOTEVAR:CATALOGBODY" scrolling=auto marginwidth=0 marginheight=0 name=CatalogBody>
- With…
<FRAME SRC="NETQUOTEVAR:CATALOGBODY" scrolling=auto marginwidth=0 marginheight=0 name=CatalogBody onLoad='onLoad2();'>
- Save and exit.
Update the site.
This is a legacy article and is intended for use with version 7 of the software and earlier