Make a Web page with a button on it. When the user clicks on that button, prompt
ID: 3850049 • Letter: M
Question
Make a Web page with a button on it. When the user clicks on that button, prompt the user for a keyword. Then, populate a div on that Web page with images from Flickr, using the keyword from the user. You can save a lot of time by borrowing the jQuery and json code from BB. (JQuery and json code works fine. I only need help with Script and HTML code. I put the image on the right side of the div.)
HTML code:
<!DOCTYPE html>
<html>
<!--from http://alistapart.com/article/holygrail-->
<title>getJSON</title>
<meta charset="utf-8" />
<script src="jquery-3.1.1.min.js"></script>
<script type=text/javascript>
var newvalue;
function changetext() {
var newvalue = prompt("what?");
alert(document.getElementById("Image").innerHTML.toString());
}
(function() {
var flickerAPI = "http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?";
$.getJSON( flickerAPI, {
tags: "cat",
tagmode: "any",
format: "json"
})
.done(function( data ) {
$.each( data.items, function( i, item ) {
$( "<img>" ).attr( "src", item.media.m ).appendTo( "#images" );
if ( i === 5 ) {
return false;
}
});
});
})();
</script>
<head>
<link rel="stylesheet" type="text/css" href="threecolumns.css"/>
</head>
<body>
<div id="header"><h1>The Header Stuff Goes Here</h1></div>
<div id="container">
<div id="left"><p>
<h1>left Column Here</h1></p>
<h3><p>"It is the mark of an educated mind to be able to entertain a thought without accepting it." -
Aristotle</p></h3>
</div>
<div id="center"><img src="tg.jpeg" alt="Mountain View"> <h4>
</h4></div>
<div id="right">
<button></button><div id = "images" </div>
<p>
<h1>Right Column Here</h1></p>
<pre><h2>
Right Column Here.
</h2></pre>
</div>
</div>
<div id="footer"><span id="mypix"/>
<h1>Bottom of the Page Stuff Here</h1></div>
</body>
</html>
Explanation / Answer
Image is not loading...Please check it and reupload it.I am sorry if it is servers fault..Anyway thanks for posting a question...
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.