Project Part 2 (of 2) - Movie Poster And Actor! - Lookup

Similar documents
Dingle Coderdojo 6. Project Part 2 (of 2) - Movie Poster And Actor! - Lookup. Week 6

This project will use an API from to retrieve a list of movie posters to display on screen.

CSS (Cascading Style Sheets)

Working Bootstrap Contact form with PHP and AJAX

Mobile Design for the Future That is Here Already. Rick Ells UW Information Technology University of Washington

Bootstrap 1/20

Chapter6: Bootstrap 3. Asst.Prof.Dr. Supakit Nootyaskool Information Technology, KMITL

For instructions to change the logo, please refer to: ore

User manual Scilab Cloud API

jquery to connect with DynamoDB via Lambda API March 9-10, 2017 CS160 Section

IN Development in Platform Ecosystems Lecture 3: json, ajax, APIs

LAMPIRAN. Index.php. <?php. unset($_session["status"]); //session_destroy(); //session_destroy();

Responsive Web Design and Bootstrap MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 게시판리스트보기.

Making a live edit contact list with Coldbox REST & Vue.js

Description: This feature will enable user to send messages from website to phone number.


Session 5. Web Page Generation. Reading & Reference

Where s My Cat? <title>where's My Cat?</title> </head> <body> <h1 class="where">where's MY CAT?</h1>

Front-End UI: Bootstrap

Mul$media im Netz (Online Mul$media) Wintersemester 2014/15. Übung 06 (Haup-ach)

User manual Scilab Cloud API

,.., «..»

For instructions to change the logo, please refer to:

Mastering the APEX Universal Theme

AngularJS. CRUD Application example with AngularJS and Rails 4. Slides By: Jonathan McCarthy

src1-malan/ajax/ajax1.html ajax1.html Gets stock quote from quote1.php via Ajax, displaying result with alert().

Assignment: Seminole Movie Connection

Lecture 7. Action View, Bootstrap & Deploying 1 / 40

Mobile Web Development

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

appendix Introduction to Foundation, the front-end framework

Mateen Eslamy 10/31/13

26 $host = "localhost" ; 27 $user = "marcolg" ; 28 $password = "" ; 52 $connessione = new mysqli ($host, $user, $password );

Programming web design MICHAEL BERNSTEIN CS 247

A WEB APPLICATION FOR ONLINE POLLING. A Thesis. Presented to the. Faculty of. San Diego State University. In Partial Fulfillment

APACHE SLING & FRIENDS TECH MEETUP BERLIN, SEPTEMBER Hypermedia API Tools for Sling (HApi) Andrei Dulvac, Adobe

А «- - «Exellent»» 50, 18, «Exellent»., , -., -. -,, html -. - «Exellent»,.

WEB/DEVICE DEVELOPMENT CLIENT SIDE MIS/CIT 310

Building beautiful websites with Bootstrap: A case study. by Michael Kennedy michaelckennedy.net

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 07 Minor Subject

UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2016 EXAMINATIONS. CSC309H1 S Programming on the Web Instructor: Ahmed Shah Mashiyat

NukaCode - Front End - Bootstrap Documentation

Css Manually Highlight Current Link Nav Link

CSS (Cascading Style Sheets): An Overview

Purpose of this doc. Most minimal. Start building your own portfolio page!

For instructions to change the logo, please refer to: ore

Elementary! Incorporating BlueMix, Node-RED and Watson in Domino applications

Web Programming BootStrap Unit Exercises

Адаптивный дизайн веб-страниц с использованием сеточных технологий

Manual Html A Href Onclick Submit Button

Session 18. jquery - Ajax. Reference. Tutorials. jquery Methods. Session 18 jquery and Ajax 10/31/ Robert Kelly,

For instructions to change the logo, please refer to: ore

Freebasing for Fun and Enhancement Sean Hannan The Sheridan Libraries Johns Hopkins University

AngularJS. CRUD Application example with AngularJS and Rails 4. Slides By: Jonathan McCarthy

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

Django Part II SPARCS 11 undead. Greatly Inspired by SPARCS 10 hodduc

LAMPIRAN-LAMPIRAN A. Source Code 1) Sample Controller pada HomeController.php

ICENIUM Hands On Lab. Hybrid Mobile Application Development with Telerik s Icenium & Kendo UI Mobile

Jquery Ajax Json Php Mysql Data Entry Example

django-rest-framework-datatables Documentation

Enhancing Koha s Public Reports Feature

Responsive Web Design (RWD)

FatModel Quick Start Guide

Using Visual Studio 2017

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://

Ten good practices for ASP.NET MVC applications

PASS4TEST 専門 IT 認証試験問題集提供者

JSON POST WITH PHP IN ANGULARJS

Introduction to Computer Science Web Development

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p> <a href=" </a></p> </ul> <li> </li> <ol>

Create First Web Page With Bootstrap

JavaScript Security. Learn JavaScript security to make your web applications more secure. Y.E Liang. BIRMINGHAM - MUMBAI

SEEM4540 Open Systems for E-Commerce Lecture 11 Advanced Topics

AngularJS AN INTRODUCTION. Introduction to the AngularJS framework

LAMPIRAN. <meta name="description" content="creative - Bootstrap 3 Responsive Admin Template">

ADDING INPUTS FORM FACTORY V2

Paythru Remote Fields

<link rel="stylesheet" href="

INTRODUCTION TO WEB DEVELOPMENT IN C++ WITH WT 4

Web UI. Survey of Front End Technologies. Web Challenges and Constraints. Desktop and mobile devices. Highly variable runtime environment

Last class we looked at HTML5.

Form Processing in PHP

Programmazione Web a.a. 2017/2018 HTML5

Akumina Digital Workplace

HTML, CSS, Bootstrap, Javascript and jquery

AngularJS Examples pdf

Getting Started with

Web Sciences. Demonstration: World's Tallest Building. IB Computer Science. Student. Date:

Week 8 Google Maps. This week you ll learn how to embed a Google Map into a web page and add custom markers with custom labels.

SEEM4570 System Design and Implementation. Lecture 4 AJAX and Demo

CSCE 120: Learning To Code

Porto: How to Add More Content to Slideshows

Python For Hackers. Shantnu Tiwari. This book is for sale at This version was published on

How the Internet Works

LFE Medieninformatik WS 2016/2017

REST AND AJAX. Introduction. Module 13

TEDApps - etendering. Ref: etendering-fus-listservice etendering - CFT List Service Version: Publications Office

CPET 499/ITC 250 Web Systems. Topics

Licence CRRW IUT de Marne-la-Vallée 26/01/2018. AJAX with jquery. Philippe Gambette

Transcription:

Getting Started 1. Go to http://quickdojo.com 2. Click this: Project Part 2 (of 2) - Movie Poster And Actor! - Lookup This is an extension of what you did the last time (the Movie Poster lookup from Week 5). Make sure you ve finished that before starting this week s content. Note: All the HTML over the next few pages is part of the same page. I ve broken it up so that I can add explanations! The new content is in BOLD. Everything else was from last week. 1

<!DOCTYPE html> <html> <head> <title>dojo Movie Lookup</title> <script src="http://ajax.aspnetcdn.com/ajax/jquery/ jquery-2.1.3.min.js"></script> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootswatch/ 3.3.2/lumen/bootstrap.min.css"/> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/ bootstrap.min.js"></script> <link rel='stylesheet' href='http://sensorpro.net/documents/dojo/ responsivegrid.css'> <script> $(function() { var url = 'http://api.themoviedb.org/3/', modemovie = 'search/movie', modeactor = 'search/person', input, moviename, actorname, key = '?api_key=61a82aca6630ae1cbc3635d8710c0fbe'; noposter.png'; var imagebaseurl = 'https://image.tmdb.org/t/p/original/'; var noposter = 'http://sensorpro.net/documents/dojo/ $(document).ready(function(){ $('#searchterm1').keypress(function(e){ if(e.keycode==13) $('#searchmovie').click(); $(document).ready(function(){ $('#searchterm2').keypress(function(e){ if(e.keycode==13) $('#searchactor').click(); $('#searchmovie').click(function() { $('#info').html(''); var input = $('#searchterm1').val(), moviename = encodeuri(input); moviename, $.ajax({ url: url + modemovie + key + '&query=' + datatype: 'json', success: function(data) { if (data.total_results == 0) 2

Apart from a few bolded lines, you should have all of this done already! 3

$('#searchactor').click(function() { $('#info').html(''); var input = $('#searchterm2').val(), actorname = encodeuri(input); $.ajax({ url: url + modeactor + key + '&query=' + actorname, datatype: 'json', success: function(data) { if (data.total_results == 0) alert('actor not found'); else { console.log(data); for (i = 0; i < data.results.length; i+ +) { if (data.results[i].profile_path) { $ ('#info').append('<li><img style="width:300px;height:auto;" id="profile" src="' + imagebaseurl + data.results[i].profile_path + '"</li>'); else { $ ('#info').append('<li><img style="width:300px;height:auto;" id="profile" src="' + noposter + '"</li>'); </script> </head> This is the first new section it is the function that connects to themoviedb website and retrieves actor information. It s almost an exact copy of the searchmovie section from last week, with a few small changes. Remember only add the content in bold. 4

<body> <div class="container"> <div class="page-header" id="banner"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <h1>dojo Movie Lookup</h1> <p class="lead">what do you want to look up?</p> Just a small text change here (instead of What movie do you want to look up? ) <ul class="nav nav-tabs"> <li class="active"><a href="#movie" data-toggle="tab">movie Search</ a></li> <li><a href="#actor" data-toggle="tab">actor Search</a></li> </ul> This piece will add a new tab to the top of the screen to allow you to choose between a movie search and an actor search. 5

<div id="mytabcontent" class="tab-content"> <div class="tab-pane fade active in" id="movie"> <section id="fetch"> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" placeholder="enter a movie title" id="searchterm1" /> <span class="input-group-btn"> <button class="btn btn-primary" id="searchmovie">find Movie</button> </span> </section> <div class="tab-pane fade" id="actor"> <section id="fetch2"> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" placeholder="enter an actor name" id="searchterm2" /> <span class="input-group-btn"> <button class="btn btn-primary" id="searchactor">find Actor</button> </span> </section> This part will add a new panel to the search panel (this will be displayed if you pick the Actor Search tab). Remember, only the content in BOLD is new! <div class="panel panel-info" id="results"> <div class="panel-heading"> <h3 class="panel-title">results</h3> <div class="panel-body pattern" id="pattern"> <ul class="g" id="info"> </body> </html> </ul> 6

This is the results output and the end of the HTML page. Nothing has changed here. This is what the final screen should look like: 7