SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2003
    Location
    PH
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Need Help with my "TV Screen" JavaScript

    Hi, i'm trying to make this "script" to work...anyways, what its suppose to do is have different video media files (avi, wma and if possible, quicktime) play in the same spot and the same window size. Can anyone fix / improve on it for me please? Thanks!

    ________________________________
    <head>
    <script type="text/javascript">
    function changeChannel(channel){
    if(document.getElementById){
    document.getElementById("tv_screen").src=channel;
    } }
    </script>
    </head>
    <body>
    <p><a href="jsDisabled.html" onClick="changeChannel('samx.avi'); return false;">1st Movie Intro</a>
    <br>
    <a href="jsDisabled.html" onClick="changeChannel('samuraix_sonofgod.avi'); return false;">Next Movie</a></p>
    <a href="Sample.mov" onClick="changeChannel('Sample.mov'); return false;">Quicktime Mov</a></p>
    <div>
    <center><embed id="tv_screen" src="samx.avi" autostart="false"></embed></center>
    </div></body>
    __________________________________

  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think the syntax you need is document.getElementById("tv_screen" ).settings.url for wmp or
    document.getElementById("tv_screen" ).settings.src for others. I hope it helps
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  3. #3
    SitePoint Member
    Join Date
    Sep 2003
    Location
    PH
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Markdidj
    I think the syntax you need is document.getElementById("tv_screen" ).settings.url for wmp or
    document.getElementById("tv_screen" ).settings.src for others. I hope it helps
    Tried one and the other still didn't work. Thanks though.


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
  •