SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Sep 28, 2003, 11:29 #1
- Join Date
- Sep 2003
- Location
- PH
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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>
__________________________________
-
Sep 28, 2003, 16:04 #2
- 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 helpsLiveScript: Putting the "Live" Back into JavaScript
if live output_as_javascript else output_as_html end if
-
Sep 29, 2003, 11:53 #3
- Join Date
- Sep 2003
- Location
- PH
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Markdidj
still didn't work. Thanks though.
Bookmarks