Results 1 to 3 of 3

Thread: I need help merging to javascript scripts onto one page.

  1. #1
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    612
    Thanks
    46
    Thanked 32 Times in 32 Posts

    Default I need help merging to javascript scripts onto one page.

    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/...ch/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
    Last edited by ajfmrf; 01-14-2012 at 06:59 PM.
    Thanks,

    Bud

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There could also be other conflicts. However, there is an onload conflict and it can be resolved by removing the body onload:

    Code:
    <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:

    Code:
    <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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ajfmrf (01-14-2012)

  4. #3
    Join Date
    Jan 2011
    Location
    Southeastern CT
    Posts
    612
    Thanks
    46
    Thanked 32 Times in 32 Posts

    Default

    Once again,John comes through .Thank you John.
    Thanks,

    Bud

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •