Movie search

via allociné api

HTML

<body>
<div id="filmresult">
	<h1>Movie Search</h1>	
	<input type="text" id="input" placeholder="Enter a movie title and hit return/enter...">
	<div id="resultContainer"></div>
  </div>

CSS

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


/***********************
************************
****** Main Style ******
************************
************************
*/

body {
	width: 960px;
	margin: 10 auto;
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
}

h1{
	font-size: 3.5em;
	text-align: center;
	margin: 5% auto 4%;
	font-weight: 300;
}

/* Style for address input box*/
input{
	display: block;
	margin: 2% auto 2%;
	text-align: center;
	width: 100%;
	height: 2.3em;
	font-family: 'Open Sans', sans-serif;
	font-size: 1.8em;
	font-weight: 300;
	outline: none;
	border: 1px solid #000;
}

input[type="text"]:focus {
	border-color: #4d90fe;
}

input::-webkit-input-placeholder {
    color: #000;
    opacity: 0.5;
    font-size: 0.7em;
    font-weight: 300;
    padding-top: 5px;
}

input::-moz-placeholder {
    color: #000;
    opacity: 0.5;
    font-size: 0.7em;
    font-weight: 300;
    padding-top:...

JavaScript

//	TMDB sample calls
// 	search query: http://api.themoviedb.org/3/search/movie?query={PARAMS}&api_key={api_key}
// 	poster query: http://image.tmdb.org/t/p/original/{IMAGE_PATH}
//  details url: http://api.themoviedb.org/3/movie/{ID}?api_key={api_key}&append_to_response=credits

// Things needed 
// - poster ✔
// - title ✔
// - year ✔
// - tagline ✔
// - time ✔
// - imdb rating ✔
// - description ✔
// - genres ✔
// - director ✔
// - actors ✔
// - trailer ✔
// - imdb link ✔
// - kickass link ✔

"use strict;"

var $input = document.getElementById('input');
var $search = document.getElementById('search');
var $resultContainer = document.getElementById('resultContainer');
var api_key = "9e1b08f9af16f8d7c20c0dd0aeb4749a";
var movieBaseUrl = "http://api.themoviedb.org/3/search/movie";
var imageBaseUrl = "http://image.tmdb.org/t/p/original";
var detailsBaseUrl = "http://api.themoviedb.org/3/movie/"; 
var appendDetails = "&append_to_response=videos,reviews,rating,casts";

var responseJSON, resultsArray;

$input.addEventListener('keypress', function(e){
	
	if (e.keyCode == 13) {
	
		//clearing results div
		$resultContainer.innerHTML = "";
		
		//forming url for querying TMDb
		var searchUrl = movieBaseUrl + "?api_key=" + api_key + "&query=" + $input.value;
		
		var searchXHR = new XMLHttpRequest();
		searchXHR.open("GET", searchUrl, true);

		searchXHR.onreadystatechange = function(){
			if (searchXHR.readyState === 4 && searchXHR.status === 200) {
				responseJSON = JSON.parse(searchXHR.responseText);
				resultsArray = responseJSON.results;

				//
				if(responseJSON.results.length === 0) {
					console.log($input.value + "not found");
					var noResult = document.createElement('h1');
					noResult.innerHTML = '<b>' + $input.value + '</b>' + " not found :(" + '<br>';
					noResult.innerHTML += "You need to search with a valid movie title."
					$resultContainer.appendChild(noResult);
				}

				for (var i = 0; i < resultsArray.length; i++) {
					var tmdbPoster =...