1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <title>mjt yahoo test</title>
7 <script type="text/javascript" src="http://mjtemplate.org/dist/mjt-0.6/mjt.js"></script>
8 <script type="text/javascript" src="http://mjtemplate.org/dist/mjt-0.6/src/yahooapi/yahooapi.js"></script>
10 <body onload="mjt.run('top')">
11 <h2>Yahoo image search example</h2>
13 <a href="http://mjtemplate.org">mjt</a>
15 <a href="http://developer.yahoo.com/common/json.html">yahoo json api</a>
16 <div id="top" style="display:none;">
18 mjt.yahooapi.ImageSearch(mjt.urlquery.query||'kathakali')
20 <form method="get" action="">
22 <input type="text" name="query" value="${mjt.urlquery.query||''}" />
23 <input type="submit" value="search" />
26 <div mjt.choose="o.state">
27 <div mjt.when="ready">
28 <div mjt.for="img in o.result.Result">
30 <img alt="image" src="#" mjt.src="$img.Thumbnail.Url" style="float:left" />
31 <div>$img.Summary</div>
32 <hr style="clear:both" />
38 <div mjt.when="error">
39 <div mjt.for="msg in o.messages">