Link to home
Start Free TrialLog in
Avatar of HelpNearMe
HelpNearMeFlag for Afghanistan

asked on

pop up youtube video

Hi Experts,

I 'd like to add a youtube video to a website.  I don't want the video displayed in the page, instead I'd like it to pop up into a smaller window and begin playing when the user clicks the link on the page.

Anyone know where I can get a simple free solution for this or any ideas on how I would write the script to do it?

Thanks,

HNM

Avatar of myr1
myr1

You can use this code to open it in a new window:
<a href="http://youtube.com" onclick="!window.open(this.href,'windowname','location=0,status=0,width=800,height=600')">Open YouTube</a>

Open in new window

If you want to autoplay it, then add "&autoplay=1" at the end of the link.
(for example "http://www.youtube.com/v/OuSdU8tbcHY&autoplay=1")
ASKER CERTIFIED SOLUTION
Avatar of myr1
myr1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial