goddamm errors ! in IE8

Discussion in 'JavaScript' started by mysoogal, Dec 11, 2008.

  1. #1
    can someone help me, i want to kill this goddam error on IE7/8 on firefox it doesnt show the error on the stats bar, i really want to get ride of this error so annoying to look at.

    [​IMG]

    here is the player.js from where i get the data

    function StreamPlugPlayUrl(url)
    {
    	if(navigator.appName=="Microsoft Internet Explorer")
    	{
    	    var spie=document.getElementById('StreamPlugIe');
    	    if (spie)
    	    {
    		    spie.playOnStart(1);
    		    spie.playUrl(url);
    	    }
    	}
    	else 
    	{
    	    if((document.embeds)&&(document.embeds['StreamPlugNs']))
            {	
        		document.embeds['StreamPlugNs'].playOnStart(1);
    	    	document.embeds['StreamPlugNs'].playUrl(url);
    	    }
    	}
    }
    
    
    function StreamPlugPlayUrlSave(url)
    {
    	if(navigator.appName=="Microsoft Internet Explorer")
    	{
    	    var spie=document.getElementById('StreamPlugIe');
    	    if (spie)
    	    {
    		    spie.playOnStart(1);
    		    spie.playSaveableUrl(url);
    		}
    	}
    	else
    	{
    	    if((document.embeds)&&(document.embeds['StreamPlugNs']))
            {	
    		    document.embeds['StreamPlugNs'].playOnStart(1);
    		    document.embeds['StreamPlugNs'].playSaveableUrl(url);
    		}
    	}
    }
    function StreamPlugSetBKColor(r,g,b)
    {
    	if(navigator.appName=="Microsoft Internet Explorer")
    	{
    	    var spie=document.getElementById('StreamPlugIe');
    	    if(spie)
    		    spie.setBKColor(r,g,b);
    	}
    	else
    	{
    	    
    	    if((document.embeds)&&(document.embeds['StreamPlugNs']))
    		    document.embeds['StreamPlugNs'].setBKColor(r,g,b);
    	}
    }
    function StreamPlugResizeVideo(x,y)
    {
    	if(navigator.appName=="Microsoft Internet Explorer")
    	{
        	var spie=document.getElementById('StreamPlugIe');
        	if(spie)
    	        spie.setVideoSize(x,y);
        }
    	else 
    	{
    	    if(document.embeds['StreamPlugNs'])
    	    {
    	        document.embeds['StreamPlugNs'].setVideoSize(x,y);
    	        document.embeds['StreamPlugNs'].setRatio(x,y);
    	    }
    	}
    }
    function StreamPlugPlayResize(url,w,h)
    {
        StreamPlugPlayUrl      (url);
        setTimeout             ("StreamPlugResizeVideo("+w+","+h+")",500);
    }
    
    function StreamPlugSaveUrlResize(url,w,h)
    {
        StreamPlugPlayUrlSave  (url);
        setTimeout             ("StreamPlugResizeVideo(w,h)",500);
    }
    function IEIsStreamPlugInstalled()
    {
        var sptest;
        try
        {
    	    sptest 	= new ActiveXObject("cedelia.StreamPlug");
        }
        catch (e)
        {
    	    return false;
        }
        return true;
    }
    function FFIsStreamPlugInstalled()
    {
        try
        {
            for(i in navigator.plugins)
            {   
                if(navigator.plugins[i].description.indexOf('StreamPlug')>=0)
                {
                    return true;
                }
            }
        }
        catch (e)
        {
    	    return false;
        }
        return false;
    }
    
    function StreamPlugIsReady()
    {
    	if(navigator.appName=="Microsoft Internet Explorer")
    	{
    	    var spie=document.getElementById('StreamPlugIe');
    	    if ((spie)&&(spie.curversion)&&(spie.curversion>0))
            {
                return true;
            }	    
        }
        else
        {
            if( (document.embeds)&&(document.embeds['StreamPlugNs']))
            {
               return true;
            }
        }
        return false;
    }
    
    function reload()
    { 
    	location.reload();
    }
    
    function install_finished(url, status)
    {
        if (status == 0)
        {
            alert('StreamPlug installion complete');
            reload();
        }
        else
        {
           alert('StreamPlug installion failed');
           msg = "XPInstall Test:   FAILED\n";
        }
    }
    
    function update_finished(url, status)
    {
        if (status == 999)
        {
            alert('StreamPlug update complete. Changes will be active at next browser start');
        }
        else if (status == 0)
        {
            alert   ('StreamPlug update complete.');
            reload  ();
        }
        else
        {
            alert('StreamPlug update failed (status code \''+status+'\' ). Please try to close your browser windows and try again');
        }
    }
    
    function NSInstall() 
    { 
    	if(navigator.appName=="Netscape")
    	{
    		xpi={'StreamPlug Video Player (win32)':'http://messagefromme.com/streamplug/spmoz.xpi'};
    		InstallTrigger.install(xpi,install_finished);
    	}
    }
    
    function IEInstall() 
    { 
    	if(navigator.appName=="Microsoft Internet Explorer")
    	{
    	    var cur_loc=location.href;
    	    var new_loc=cur_loc+'&ieinst=1';
    	    location.href=new_loc;
    	}
    }
    
    function NSUpdate() 
    { 
    	if(navigator.appName=="Netscape")
    	{
    		xpi={'StreamPlug Video Player (win32)':'http://messagefromme.com/streamplug/spmoz.xpi'};
    		InstallTrigger.install(xpi,update_finished);
    	}
    }
    
    function display_not_installed_div()
    {
        var sp_inst_div;
    
    
    	if(navigator.appName=="Microsoft Internet Explorer")
    	{
            if((sp_inst_div=document.getElementById('nosp_ie'))!=null)
            {
                sp_inst_div.style.visibility='visible';
                sp_inst_div.style.display   ='block';
            }
    	}
    	else
    	{
            if((sp_inst_div=document.getElementById('nosp_ns'))!=null)
            {
                sp_inst_div.style.visibility='visible';
                sp_inst_div.style.display   ='block';
            }
        }
    }
    
    
    function StreamPlug_OnReady_1   (width,height)
    {
        StreamPlugResizeVideo       (width,height);
        StreamPlugSetBKColor        (40,81,121);
    }
    function StreamPlug_OnReady_2   (url,width,height)
    {
        StreamPlugPlayUrl           (url);
        StreamPlugResizeVideo       (width,height);
        StreamPlugSetBKColor        (40,81,121);
    }
    
    function StreamPlug_OnReady_3   (url,width,height)
    {
        StreamPlugPlayUrlSave       (url);
        StreamPlugResizeVideo       (width,height);
        StreamPlugSetBKColor        (40,81,121);
    }
    
    function test_plugin(url,width,height,func_num,n_tests)
    {
    	if((!IEIsStreamPlugInstalled())&&(!FFIsStreamPlugInstalled()))return;
        
        if(StreamPlugIsReady())
        {
            switch(func_num)
            {
                case 1:
                    StreamPlug_OnReady_1 (width,height);
                break;
                case 2:
                    StreamPlug_OnReady_2 (url,width,height);
                break;
                case 3:
                    StreamPlug_OnReady_3 (url,width,height);
                break;
            }
        }
        else
        {
            if(n_tests!=1000)
                n_tests--;
            
            if(n_tests>0)
                setTimeout      ('test_plugin('+url+','+width+','+height+','+func_num+','+n_tests+')',200);
        }
    }
    
    
    function put_player_html(url,width,height) 
    {    
    
    
    
        var v_height=height+62;
    
        document.write  ('<div id="sp_player_div">');
        if(url.length>0)
        {
            document.write  ('<OBJECT src="'+url+'"  CLASSID="CLSID:2019DC25-D1C0-11D6-97B3-0008A124F542" id="StreamPlugIe" name="StreamPlugIe" width="'+width+'" height="'+v_height+'" >');
            document.write  ('<param name="src" value="'+url+'"></param>');
        }
        else
        {
            document.write  ('<OBJECT CLASSID="CLSID:2019DC25-D1C0-11D6-97B3-0008A124F542" id="StreamPlugIe" name="StreamPlugIe" width="'+width+'" height="'+v_height+'" >');
        }
    
    
    
        document.write  ('<param name="width"  value="'+width+'"></param>');
        document.write  ('<param name="height" value="'+height+'"></param>');
    
    
        if(url.length>0)
        {
            document.write  ('<EMBED src="'+url+'" pluginspage="http://messagefromme.com/streamplug/StreamPlug_installer.exe" type="application/x-OGM" id="StreamPlugNs" name="StreamPlugNs" width="'+width+'" height="'+v_height+'" >');
        }
        else
        {
            document.write  ('<EMBED pluginspage="http://messagefromme.com/streamplug/StreamPlug_installer.exe" type="application/x-OGM" id="StreamPlugNs" name="StreamPlugNs" width="'+width+'" height="'+v_height+'" >');
        }
        document.write  ('</EMBED>');
        document.write  ('</object>');
        document.write  ('</div>');
    } 
    
    
    function playorinstall(ie_inst_step,url,widt,heig)
    { 
        if (parseInt(widt)>720) 
            width=720;
        else 
            width=parseInt(widt);
    
        if (parseInt(heig)>451) 
            height=420+62;
        else 
            height=parseInt(heig);
        
        if (heig==62) 
            height=62;
    
    	if(navigator.appName=="Microsoft Internet Explorer")
        {
    
    	    if(( IEIsStreamPlugInstalled()==true)||(ie_inst_step==1))
    	    {
       		    put_player_html             (url,width,height);
    	    }
    	    else
    	    {
    	       display_not_installed_div  ();
    	    }
        }
        else
        {
           if(FFIsStreamPlugInstalled())
    
           {
                put_player_html             (url,width,height);
           }
           else
           {
                display_not_installed_div   ();
           }
        }
    }
    
    Code (markup):
     
    mysoogal, Dec 11, 2008 IP
  2. mysoogal

    mysoogal Guest

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i've fixed the error by my self lol by removing this thing " MFM_triggerpls(); " in another template :D

    now my whole site is error free !
     
    mysoogal, Dec 11, 2008 IP