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


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

Unfortunately I cant get the code I was sent to work the way it does in the example here. What happens on my system is that the page with the links on is completely replaced by a full 'You Tube' page - not by a pop-up on the original page. Also, adding the 'true' (without the quotes) parameter has no effect whatever.[br /][br /]Any idea what I might doing wrong to cause this? I think I've copied and pasted everything correctly. Thanks for any ideas you can give.[br /][br /]Regards,[br /][br /]Bob

Bob Squires Sep 29, 2008