Task: Populate states based on Country using AJAX.
In previous post its done using javascript. Now its based on Ajax.
In this example i used static data. we can do it using Database. Based on country it will get the corresponding states.
1). RegisterUser.jsp
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<html>
<head>
<script type="text/JavaScript" src="javascripts/CommonAjax.js"></script>
</head>
<body> <h2>Struts1.3 - Ajax Example</h2>
In previous post its done using javascript. Now its based on Ajax.
In this example i used static data. we can do it using Database. Based on country it will get the corresponding states.
1). RegisterUser.jsp
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<html>
<head>
<script type="text/JavaScript" src="javascripts/CommonAjax.js"></script>
</head>
<body> <h2>Struts1.3 - Ajax Example</h2>