SiteXpert FAQ

Question ID:
Q1012
Question:
When I combine the site map with other JavaScript code on a single page, the site map doesn't work properly (e.g. all folders are expanded) or the other script-driven coponent doesn't work. How do I fix this?
 
This is most likely caused by duplicate onLoad event handlers. Sitemap generated by SiteXpert as well as the other script-driven component need this handler to work correctly. To fix the problem, you need to call both onLoad handlers. First, you need to locate the custom event handler call (the one which comes from the other script-driven component). This is most likely placed in the tag or inside script code, e.g. window.onload='[handler_function]'. Once you locate this handler, remove it. Now, add the following code anywhere in the body section of your web page:
<script language='JavaScript'>
<!--
addLoadHandler ('[handler_function]');
//-->
</script>
Please make sure you replace [handler_function] with the name of the other handler function in the above code.

Below is an example:

<script language='JavaScript'>
<!--
function xyz()
{
alert ('this will be displayed when the page is loaded');
}

addLoadHandler ('xyz');
//-->
</script>