Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-02-2012, 09:32 PM   PM User | #1
Tim@DIM
New Coder

 
Join Date: Dec 2011
Location: Detroit
Posts: 62
Thanks: 17
Thanked 0 Times in 0 Posts
Tim@DIM is an unknown quantity at this point
Exclamation how can i make a video play in a different location

I have a list of videos on one side of my page and a larger player in the main content column on the left.
how can i click a video on the right and have it play in the big player on the left?



image URL (in case it doesnt show in the post) http://mydomainsample.com/tims/ScreenShot.png

also i would prefer to do this with links to youtube/vimeo rather than putting video files on my server.

Last edited by Tim@DIM; 02-02-2012 at 09:57 PM.. Reason: image not displaying right
Tim@DIM is offline   Reply With Quote
Old 02-02-2012, 10:18 PM   PM User | #2
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
what are those on the right side? photos? if they are simple img tags, you can use this code, which works with links, but just moving the onclick over to the img tag:

Code:
<html>
<head>
<title> Sample Page </title>
<script>
function play(clip){
document.getElementById("frame").src= "http://www.youtube.com/v/"+clip+"&autoplay=1&rel=0";
 } 
</script>
</head>
<body>
<object width="425" height="355"><param name="movie" value=""></param><param name="wmode" value="transparent"></param><embed id ="frame" src="" type="application/x-shockwave-flash" border="1" wmode="transparent" width="425" height="344"></embed></object><br>
<a href="#" onclick="play('6Zx39v3JUUI'); return false"> THIS IS FIRST Video Link </a><br>
<a href="#" onclick="play('VVp0eo0vN8U'); return false"> THIS IS SECOND Video Link </a>
</body>
</html>
xelawho is offline   Reply With Quote
Old 03-28-2012, 08:17 PM   PM User | #3
Tim@DIM
New Coder

 
Join Date: Dec 2011
Location: Detroit
Posts: 62
Thanks: 17
Thanked 0 Times in 0 Posts
Tim@DIM is an unknown quantity at this point
I worked it out.
thanks
Tim@DIM is offline   Reply With Quote
Old 11-25-2012, 03:04 AM   PM User | #4
bandm1
New to the CF scene

 
Join Date: Nov 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
bandm1 is an unknown quantity at this point
Quote:
Originally Posted by Tim@DIM View Post
I worked it out.
thanks
Can you please share how you worked it out? Did you use the above solution? Or do you have a different one?
I'm trying to solve the same issue (in Wordpress), while keeping them as videos.
Thanks!!
bandm1 is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, video gallery, video player

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:04 AM.


Advertisement
Log in to turn off these ads.