Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Client-side Scripting _ Please help, script conflict

Posted by: Fuxas Oct 14 2006, 05:06 AM

Hi all who view this topic

I`ve got two ready to use scripts (cascade menu & calendar). If they applied separately its great and they work. But when i try to apply them both the menu stops working. I`m not fluent in html and maybe i mess up with coding..

The site with both scripts applied http://www.freewebs.com/film-ru/www.htm
___________________________________________________________________________
Cascade menu coding http://javascript.internet.com/navigation/cascading-menu.html#source

Calendar code http://www.javascriptkit.com/script/script2/epoch/index.shtml needs downloading *.rar archive


Those scripts perfectly meet my needs but i can`t make them work sad.gif

Thanks for any replies

Posted by: Christian J Oct 14 2006, 05:27 AM

You have both this in the BODY tag:

CODE
onLoad="writeMenus()"


and this at the bottom:

CODE
window.onload = function () {
        ms_cal  = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
};


but two onloads on the same page cause conflicts. One workaround that might work is to remove the one in the BODY tag and instead use:

CODE
window.onload = function () {
        ms_cal  = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
        writeMenus();
};

Posted by: Fuxas Oct 14 2006, 06:24 AM

Thanks this change solved my problem! smile.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)