View Full Version : Resolved I need help merging to javascript scripts onto one page.
ajfmrf
01-14-2012, 03:52 AM
1) Script Title: Live Date Script
2) http://www.dynamicdrive.com/dynamicindex6/clock3.htm
3) Describe problem: I am trying to put this and a script from here http://www.javascriptkit.com/script/script2/epoch/index.shtml with the live date script and it appears the onload funtions are preventing the calendar from working.
Is there some type of work around I can use to get these to work together.
thanks
jscheuer1
01-14-2012, 05:03 AM
There could also be other conflicts. However, there is an onload conflict and it can be resolved by removing the body onload:
<body onLoad="goforit()">
from the Dynamic Drive Live Date Script. And then where you have this or similar for the Epoch DHTML Calendar script, add the highlighted as shown:
<script type="text/javascript">
/*You can also place this code in a separate file and link to it like epoch_classes.js*/
var bas_cal,dp_cal,ms_cal;
window.onload = function () {
goforit();
bas_cal = new Epoch('epoch_basic','flat',document.getElementById('basic_container'));
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
ms_cal = new Epoch('epoch_multi','flat',document.getElementById('multi_container'),true);
};
</script>
The browser cache may need to be cleared and/or the page refreshed to see changes.
If you want more help, please post a link to the page on your site that contains the problematic code so we can check it out.
ajfmrf
01-14-2012, 12:24 PM
Once again,John comes through .Thank you John.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.