1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < title > Movie Quotes</ title >
6+ < link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css ">
7+ < script src ="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js "> </ script >
8+ < script src ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js "> </ script >
9+ < script >
10+ function fetch ( str ) {
11+ var request = new XMLHttpRequest ( ) ;
12+ request . onreadystatechange = function ( ) {
13+ if ( this . readyState == 4 && this . status == 200 ) {
14+ var response = this . responseText ;
15+ document . getElementById ( "stage" ) . innerHTML = response ;
16+ }
17+ } ;
18+ request . open ( "GET" , "details.jsp?str=" + str , true ) ;
19+ request . send ( ) ;
20+ }
21+ </ script >
22+ < script >
23+ </ script >
24+
25+ < style >
26+ body {padding : 10% ; margin : 0 ; text-align : center;}
27+ h2 {color : maroon;}
28+ # stage {font-family : verdana;padding : 30px ;font-size : 14pt ;}
29+ </ style >
30+
31+ </ head >
32+ < body >
33+ < img src ="imgs/movies.jpg " class ="img-responsive " />
34+ < h2 > Some Movie Quotes</ h2 >
35+ < hr >
36+ < button type ="button " class ="btn btn-warning " onclick ="fetch('casablanca') "> Casablanca</ button >
37+ < button type ="button " class ="btn btn-warning " onclick ="fetch('lovestory') "> Love Story</ button >
38+ < button type ="button " class ="btn btn-warning " onclick ="fetch('scarface') "> Scarface</ button >
39+ < button type ="button " class ="btn btn-warning " onclick ="fetch('taxidriver') "> Taxi Driver</ button >
40+ < button type ="button " class ="btn btn-warning " onclick ="fetch('thedarkknight') "> The Dark Knight</ button >
41+ < button type ="button " class ="btn btn-warning " onclick ="fetch('thegodfather') "> The Godfather</ button >
42+ < button type ="button " class ="btn btn-warning " onclick ="fetch('thesilence') "> The Silence of the Lamps</ button >
43+ < button type ="button " class ="btn btn-default " onclick ="document.getElementById('stage').innerHTML=''; "> Clear</ button >
44+ < div id ="stage "> </ div >
45+ </ body >
46+ </ html >
0 commit comments