Results 1 to 5 of 5

Thread: questions about a script

  1. #1
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default questions about a script

    okay Ihave this script I can't get it to work right but it off of something that does work. here are my questions. 1: is it cross browser? 2:what do I need to do if I wanted to add a quicktime player to it?
    Code:
    function playSongs(){
     
      var sel = document.forms.sell;
     document.getElementById('MTVplayer').innerHTML=
    is innerHTML cross browser?'<object width="250" height="59" id="Player" 
    classid="CLSID:6BF52A52-394A-1
    1d3-B153-00C04F79FAA6" type="application/x-oleobject">
    <param name="URL" value="'+document.getElementById('sell').value+'">
    <param name="autoStart" VALUE="true">
    <param name="uiMode" value="full">
    <param name="currentPosition" vaule="1" >
    <param name="ShowStatusBar" value="true"  >
    <embed type="application/x-mplayer2" src="'+document.getElementById('sell')
    .value+'" ShowControls="0" width="250" height="50"></embed></object>';
        do I need to add the quictime player here}

    HTML Code:
    <div id="chooseshow">
     <input type="button" value="Play" onclick="playSongs();finded()" />
     
     
     <select name="sel1"  size="4" multiple="multiple"  id="misterio"  onchange="">
    <option value="Digimon Season 2 - Episode 19 - An Old Enemy Returns.wmv" >digimon</option>
    <option value="http://www.fileden.com/files/200
    6/11/20/398972/02&#37;20-%20TOOL%20-%2010000%20DAYS%20-%20JAMBI.mp3">tool-jumbie</option>
    <option value="http://www.fileden.com/files/2006/11/20/3
    98972/Cradle%20Of%20Filth%20-Nymphetamin
    e.mp3">Cradle of Filth-Nymphetamine</option>
    <option value="http://www.fileden.com/fil
    es/2006/11/20/398972/Black%20Light%20Bu
    rns%20-%20Lie(1).mp3">Black Light Burns-Lie</option>
    </select>
     </div>
    HTML Code:
    <div id="MTVplayer">
    <object id="fileObj" width="300" height="450" 
    classid="CLSID:22d6f312-b0f6-11d
    0-94ab-0080c74c7e95" 
    codebase="http://activex.microsoft.com/ac
    tivex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
    standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
    <param name="fileName" value="'window.retry'">
    <param name="autoStart" value="true">
    <param name="showControls" value="true">
    <param name="loop" value="false">
    <param name="uiMode" value="full">
    <embed  id="fileEmb" type="application/x-mplayer2" 
    src="'window.retry'"
    ShowControls="1"
    width="235"
    height="160">
    </embed>
    </object>
    </div>]
    If I add the quicktime player up there I need one her right. cause I have one in my real code

  2. #2
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    here I give you the link to the site I got the idea off of

    http://codingforums.com/showthread.php?t=50666&page=2

  3. #3
    Join Date
    May 2006
    Location
    Alaska
    Posts
    163
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Default

    This is mostly HTML and I have no clue about quicktime because somepeople use other things, but yes, .innerHTML is cross browser, I'm not sure to what extent but I believe it works in Firefox and IE.

  4. #4
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    oh good. I hope most people use IE and FF when they come to my site.
    I guess I can do the same with quicktime as with WMP if something goes wrong I'll reply.

  5. #5
    Join Date
    Nov 2006
    Posts
    236
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    okay I tok their code and changed it around a bit. it doesn't work in firefox. I have an idea why but first it's just not working right in IE. here I ''l show you what I did.
    Code:
    function song(){
    document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' 
    id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' 
    src='"+document.getElementById('cancion').value+"' 
    name='MediaPlayer1' width='300' height='75' 
    controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
    }
    
    
    function song2(){
    document.getElementById('music3').innerHTML="
    <embed type='video/quicktime' id='music4' pluginspage='http://www.apple.com/quicktime/download/' 
    src='"+document.getElementById('cancion2').value+"' name='MediaPlayer5' width='300' height='75' controller="false"  
    autoplay="true"></embed>";
    }
    
    //-->
    </script>
    That's the head section


    HTML Code:
    <div id="jukebox">JUKEBOX<br><br>
    <select  id="cancion" onchange="song()" size="1"> 
       <option value="none">::::::::::::: Choose Your Song Here :::::::::::::</option>
       <option value="Digimon Season 2 - Episode 19 - An Old Enemy Returns.wmv ">Song 1</option>
       <option value="http://urltosong2.mp3">Song 2</option>
       <option value="http://urltosong3.mp3">Song 3</option>
       <option value="http://urltosong4.mp3">Song 4</option>
       <option value="http://urltosong5.mp3">Song 5</option>
       <option value="http://urltosong6.mp3">Song 6</option>
       <option value="http://urltosong7.mp3">Song 7</option>
       <option value="http://urltosong8.mp3">Song 8</option>
       <option value="http://urltosong9.mp3">Song 9</option>
       <option value="http://urltosong10.mp3">Song 10</option>	
    </select><br> 
    <span id="music1"><embed type="application/x-mplayer2" id="music1"
    pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" 
    src="" 
    name="MediaPlayer1" 
    width="300"
    height="70"
    controltype="2" 
    showcontrols="1"
    showstatusbar="1"
    AutoStart="0">
    </embed></span>
    </div>
    
    
    <select  id="cancion2" onchange="song2()" size="1"> 
       <option value="none">::::::::::::: Choose Your Song Here :::::::::::::</option>
       <option value="Digimon Season 2 - Episode 19 - An Old Enemy Returns.wmv ">Song 1</option>
       <option value="http://urltosong2.mp3">Song 2</option>
       <option value="http://urltosong3.mp3">Song 3</option>
       <option value="http://urltosong4.mp3">Song 4</option>
       <option value="http://urltosong5.mp3">Song 5</option>
       <option value="http://urltosong6.mp3">Song 6</option>
       <option value="http://urltosong7.mp3">Song 7</option>
       <option value="http://urltosong8.mp3">Song 8</option>
       <option value="http://urltosong9.mp3">Song 9</option>
       <option value="http://urltosong10.mp3">Song 10</option>	
    </select>
    
    <span id="music3"><embed type="video/quicktime" id="music3"
    pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" 
    src="" 
    name="MediaPlayer1" 
    width="300"
    height="70"
    controller="false"  
    autoplay="true"
    autoplay="true">
    </embed></span>
    The body section. I just don't understand why I can't make a select player for quictime.

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
  •