PDA

View Full Version : a web site movie player



riptide
03-12-2007, 06:57 PM
I can't seem to get any help.

I am trying to make a div that pops up when you click on a link then takes the href of the link and uses it to play a avi movie in a new div(misterioProgram). The object and embed tags are written in the script.
now I just don't know why wont work. I don't know if the function that writes the divs works because the <li> acts like I didn't add <a> tag inside of them. You can see that in the HTML code. I can't click it. I also can't get the main div misterioProgram to switch to dissplay=block. If I can't get the Div to pop up I can't test the rest of the code.






/*function to make the new movie <div> and find what HTML <li> and <a> was clicked*/function misterio(){var Mpdiss=document.getElementById("misterioProgram");var Watching=watchShows.getElementsByTagName('ul').getElementsByTagName('li').getElementsByTagName('a'); function MakeDiv(){ Watching.onclick=Mpdiss.style.display="block"; var e=window.event; whichlink=(e.target) ? e.target.id: e.srcElement.id;} switch (whichlink) {case watchshows.tt1.getElementsByTagName('li').a : misterioProgram.ChooseSeason.Mtt1.style.display="block";misterioProgram.ChooseSeason.Mtt1.style.zIndex="100"; break; }} /*function to get the right clsid for the object and embed tags and make a popup div with links to the sites that have players for AVIs*/ function reader(){ try {document.write ("clsid:6BF52A52-394A-11d3B153-00C04F79FAA")}; catch(e){ try { document.write ("clsid:02BF2505-8C17-4B23-BC80-D3488ABDDC6B")}; catch(e){try{document.write ("clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")}; catch { var searched=confirm("you don't have anything to play AVIs. To get something click okay"); if(searched == true ){document.write( "<div id='plugs'>to get quick time (URL address blocked: See forum rules) For windosw media player (URL address blocked: See forum rules)=6,0,0,0 or (URL address blocked: See forum rules) for realplayer (URL address blocked: See forum rules) </div>"); var siterem=window.setTimeout('plugoff()',90000);} /*function to remove a div with the links to plugins*/ function plugoff(){body.removeChild('plugs');window.clearTimeout(siterem) /*function to find the right pluginspage for the embed tag*/ function emplug(){ if (clsid=="02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ){document.write( '(URL address blocked: See forum rules))}if else(clsid=="6BF52A52-394A-11d3B153-00C04F79FAA"){document.write('(URL address blocked: See forum rules)/windows/mediaplayer/ en/download/')} if else (clsid=="CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"){document.write('(URL address blocked: See forum rules))}} /*a function that adds the codebase*/ function quick() {if(clsid=="6BF52A52-394A-11d3B153-00C04F79FAA"){document.write('(URL address blocked: See forum rules)=6,0,0,0')} if else (clsid=="02BF25D5-8C17-4B23-BC80-D3488ABDDC6B") {document.write('(URL address blocked: See forum rules))} /*function that writes all the object and embed tags*/ function playMTV() if{ (! document.getElementById)return; divs=document.getElementByTagName(li); var playcode=setAttribute('src',divs[mist].id.getAttribute('href')); var seplaycod=setAttribute('value',divs[mist].id.getAttribute('href')); for (mist=0;mist<divs.length;mist++) { document.write('<object id=" '+' W '+ divs[mist].id + '"standby="this will take some time"<img src="misterioloder" '); document.write('CLASSID="'+reader()+ ' " width="640" height="504" '); document.write ('codebase=" '+quick()+ '> <param name="autoStart" value="false" /> <param name="EnableJavaScript" value="true"/> <param name="PlayCount" value="1"/><param name=showControls" value="1"/><param name="EnableFullScreenControls" value="0"><param name="ShowControls" value="-1"><param name="ShowAudioControls" value="-1"><param name="ShowStatusBar" value="1"><param name="HREF" value=" '+seplaycod+ ' "/>'); document.write( '<embed id=" '+divs[mist].id+'"');document.write('pluginspage="' +emplug()+ '" src=" '+playcode+ '" width="640" height="504" autostart="false" enablejavascript="true"></embed></object>'); MisterioProgram.toplogo.Vrip.onload=playMTV(R);}} /*the function that plays the AVIs*/ function playMTV(R){if (!R) var R=window.event; thisvid=(R.target)?:R.scrElement; var movson+document.getElementById("w"+movson.id); try{movson.DoPlay();}catch(R){try {movson.Play();catch(R){alert(" No video player try realplayer,WMP or quicktime");}}} PlayMTV();} watchShows.getElementsByTagName('ul').getElementsByTagName('li').onclick=Misterio(); /*a function that stops and closes the div movie div*/ function macclo{ document.write("<div id='closing'><p onclick='closeit()'>close Misterio</p></div>") function closeit(){try{stop();body.removechid(misterioProgram)}catch(R){try{doStop();body.removechid(misterio Program)}catch(R){ var nobreaks=confirm("can't stop the playing movie.close anyway?")}; if(nobreaks==true){body.removechid(misterioProgram)}


here is the HTML code

<div id="watchShows">
<p id="thestuff">shows</p>
<img/>
<p>Teen Titans</p>
<p> season three</p>
<ul id="tt1">
<li><a herf=" " target="misterioT">the end pard one</a>
<li><!--make all the targets for the teen titans shows misterioT--> </li>
</ul>
<p id="thestuff2"></p>
</div>