function video(video,name) { var xmlhttp=null; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp=new ActiveXObject('Microsoft.XMLHTTP'); } var url = 'video.php?video=' + video + '&name=' + name; xmlhttp.open('GET',url,false); xmlhttp.send(null); var clip = xmlhttp.responseText; document.getElementById('video').innerHTML = clip; }