// Javascript var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { height: '390', width: '640', videoId: 'x_BswMKAlCY', playerVars: { 'autoplay': 1, 'controls': 1 }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } function onPlayerReady(event) { event.target.playVideo(); } function onPlayerStateChange(event) { }
// Javascript function YouTubeSearch(){ //Get users search / clean string before running query //Check results - objects - split - build //Display results. }
Search API
// Javascript function comment(){ var name= document.getElementById("name"); var comment= document.getElementById("comment"); var hr = new XMLHttpRequest(); var url = "AddComment.php"; var vars = "name="+name.value+"&comment;="+comment.value; hr.open("POST", url, true); hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); hr.onreadystatechange = function() { if(hr.readyState == 4 && hr.status == 200) { var return_data = hr.responseText; var target = document.getElementById('MyComments'); var ElementType = document.createElement('p'); ElementType.setAttribute('align', 'center'); target.appendChild(ElementType); ElementType.innerHTML=return_data; }} hr.send(vars); }
//No Javascript Added
//No Javascript Added
function _ebi(a){ return document.getElementById(a); }
function build(t,e,a,d){ var target = document.getElementById(t); var element = document.createElement(e); if(a!==""){ var attributes=a.split('|'); for (i = 0; i < attributes.length; i++) { var ap=attributes[i].split('¬'); element.setAttribute(ap[0], ap[1]); } } target.appendChild(element); if(d!==""){ element.innerHTML=d; } }Call function to build the element.
build('Container', 'div','class¬buttons','Hello');
/* No CSS Added */
//No Javascript Added
//No PHP Added
//No Javascript Added