CE 66, yetanotherforum 1.9.4 final, javascript conflict

Last post 11-15-2010, 8:42 PM by RichP714. 2 replies.
Sort Posts: Previous Next
  •  11-14-2010, 4:54 PM 64996

    CE 66, yetanotherforum 1.9.4 final, javascript conflict

    I'm running CE 6.6 through yaf 1.9.4 final with no problems.
     
    I added a javascript to my default.aspx page.  This script shows an image and hyperlink that rotates every 5 minutes.
     
    in <head>
     
    featured.js
     

    fea = new Array(
    ["http://thecarversite.com/yetanotherforum/featured/al.jpg","http://thecarversite.com/yetanotherforum/featured/al.htm","Al's main system"],
    ["http://thecarversite.com/yetanotherforum/featured/maskinisten.jpg","http://thecarversite.com/yetanotherforum/featured/maskinisten.htm","Maskinisten's main system"]

    // no comma at the end of last index
    );
    var lastImg="0";

    function changeimg()
    {   var randNum = getRand(); 
    document.getElementById("img").src = fea[randNum][0];
    document.getElementById("link").href = fea[randNum][1];
    document.getElementById("img").title = fea[randNum][2];
    setTimeout('changeimg()',300000);  } 
    function getRand () {   var rnum;  
    var id=Math.round(Math.random()*(fea.length-1));  
    rnum = id;   if (rnum==lastImg) { rnum = getRand(); }  
    lastImg=rnum;   return rnum;  }

    In <body>
     
    <body onload="changeimg();">
      <a id="link">
      <img title="img" alt="Featured System" id="img" border="0" rel="nofollow" height="108" style="float: left" class="style10" /></a>
     
     
    This script works; an image and link to a 'featured system' changes every 5 minutes,
    HOWEVER
     
    it breaks CE editing capability in yetanotherforum.
     
    If I try to create a new topic, reply to an existing topic or edit a post the CE window is blank (no toolbar) and IE shows the folloing error details
     

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 3.0.30618; .NET CLR 3.5.30729)
    Timestamp: Sun, 14 Nov 2010 22:38:27 UTC


    Message: Object doesn't support this property or method
    Line: 3
    Char: 19227
    Code: 0
    URI: http://thecarversite.com/yetanotherforum/CuteSoft_Client/CuteEditor/Load.ashx?type=scripts&file=IE_Loader


    Message: Object doesn't support this property or method
    Line: 3
    Char: 19227
    Code: 0
    URI: http://thecarversite.com/yetanotherforum/CuteSoft_Client/CuteEditor/Load.ashx?type=scripts&file=IE_Loader
     
     
    I'm certain there's a javascript conflict, but don't know a workaround........anyone?
     

    Running CuteEditor in YetanotherForum at http://thecarversite.com
  •  11-14-2010, 7:31 PM 64997 in reply to 64996

    Re: CE 66, yetanotherforum 1.9.4 final, javascript conflict

    Hi RichP714,
     
    I just tested the code you provided, it works fine for me.
     
    Can you set up ftp access for me and send the test page url and reproduce steps to Kenneth@CuteSoft.net? I will check it and get back to you as soon as possible.
     
    Regards,
     
    ken
  •  11-15-2010, 8:42 PM 65017 in reply to 64997

    Re: CE 66, yetanotherforum 1.9.4 final, javascript conflict

    Hard to do, since leaving it as above renders the forum's post editor (CE 6.6) non functional, and I don't want to leave it that way.  I'm using an alternate type of link rotator (swf based instead of javascript) and it doesn't conflict with CE; sorry for taking up your time

    Running CuteEditor in YetanotherForum at http://thecarversite.com
View as RSS news feed in XML