한요섭

1207

......@@ -214,7 +214,6 @@ function get_info_using_genre(code,search, res) {
var data = JSON.parse(body);
var total = data['total'];
var items = data['items'];
console.log(data);
res.render('movie_info',{item:items});
}
......
......@@ -17,28 +17,28 @@ $(function () {
$('.click_genre').click(function () {
var str = $(this).text();
$.ajax({
type:"GET",
url:"errata",
data:{'query':$("#search_input").val()},
success:function(args2){
if( args2.errata==""){
var search = $("#search_input").val();
}
else{
var search =args2.errata;
}
$.ajax({
type:"GET",
url:"errata",
data:{'query':$("#search_input").val()},
success:function(args2){
if( args2.errata==""){
var search = $("#search_input").val();
}
else{
var search =args2.errata;
}
$.ajax({
type:"GET",
url:"serach",
data:{'genre':str, 'search':search},
success:function(args){
$('#info').html(args);
//alert(args);
alert(str + " 장르를 선택하셨습니다");
},
});
},
});
url:"serach",
data:{'genre':str, 'search':search},
success:function(args){
$('#info').html(args);
//alert(args);
alert(str + " 장르를 선택하셨습니다");
},
});
},
});
})
})
......
import sys
print sys.argv
<table class="table table-condensed">
<thead>
<tr>
<th>제목</th>
<th>사진</th>
</tr>
</thead>
<tbody>
<% for(var i=0; i < item.length; i++) { %>
<tr>
<td> <p><%= item[i]["title"]%></p></td>
</tr>
<% } %>
</tbody>
</table>
......@@ -17,8 +17,8 @@
<tbody>
<% for(var i=0; i < item.length; i++) { %>
<tr>
<td> <p><%= item[i]["title"]%></p></td>
<td><img src="<%=item[i].image%>"></td>
<td> <p><%= item[i]["title"] %></p></td>
<td><img src="<%= item[i].image %>"></td>
<td> <p><%= item[i]["subtitle"]%></p></td>
<td> <p><%= item[i]["pubDate"]%></p></td>
<td> <p><%= item[i]["director"]%></p></td>
......