March 07, 2017

sample web application using ajax jquery - spring mvc


sample web application


JSP page

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link href="css/branches.css" rel="stylesheet" type="text/css" media="screen" />
<script src="http://code.jquery.com/jquery-1.10.2.js" type="text/javascript"></script>
<script type="text/javascript" src="js/branches.js" ></script>
</head>
<body>
<h1>listing</h1>
<div id="branchListDiv">
</div>
</body>
</html>

css page(css/branches.css)

table{
    
    border: 1px solid black;
    
}

js page(js/branches.js)


$(document).ready(function() {
var branches = ["Regional Office", "tsm nadakkavu", "zonal office"];
                        $('#branchListDiv').html('<div class="branch"><table width="400" height="80"><tr><th>TRIVENI SUPER MARKET NADAPURAM</th></tr><tr><td>NEAR BUSSTAND</td><td>400sqft</td><td rowspan="3">img</td></tr><tr><td>NADAPURAM POST</td><td>3000rent</td></tr><tr><td>PH:2345698</td></tr></table></div>');
                });



http://javabelazy.blogspot.in/

Facebook comments