Video Popup List | JavaScriptSource

Video Popup List

Patrick Hunlock Sep 17, 2008


If you have a number of videos to show off, a select list is a good option. Use this script to display videos in a popup window, using the video links from the list. This method saves a large amount of space on the page.


Note: If "true" is added to the second argument, the video will appear over a gray screen:
<a href="" onclick='return popVideo("vid2",true)'>A Nice Video</a>

Additional information can be found in this article.

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: video.js


Paste this code into the HEAD section of your HTML document.


Paste this code into the BODY section of your HTML document

Leave a Response


Tried it, failed miserably. (chrome) Seems to be the hardest way to do very little. It just goes to youtube and shows the video. Don't need script for that.

Frits May 9, 2013

Your question is beyond the scope of these comments. You will need to post it over on [a href=""]the JavaScript forum[/a]. Thanks!

Lee Oct 31, 2008

That's because you don't have any space at the top. You'll need to either add extra space or change the CSS settings.

Lee Oct 31, 2008

Just change the location (path) of the file in both places.

Lee Oct 31, 2008

Hello if i have flv video on my server how to play with this settings or quicktime , wmv video on my server ?

Tejinder Singh Oct 21, 2008