Javascript code:

function showVideo(){
	document.getElementById("video_popup").style.visibility="visible";
obj = document.getElementById("video_popup"); 
        if (obj.style.display == "none") { 
            obj.style.display = ""; 
        } 
    } 
function hideVideo(){
	document.getElementById("video_popup").style.visibility="hidden";
obj = document.getElementById("video_popup"); 
        if (obj.style.display == ""){ 
            obj.style.display = "none"; 
        } 
    }

.......................... Open and close divs>>>>
<a href="javascript:showVideo();">Watch the Video</a>
<p id="closebutton"><a href="javascript:hideVideo();">Close Window</a></p>

This is the Java forum - not Javascript, which has it's own forum in the Web Development section.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.