Bael 736 (#1646)
* dynamic validation * small fixes * remove set property * fix conflicts * fix conflicts * add optional
This commit is contained in:
@@ -43,4 +43,6 @@ servlet.mapping=/dispatcherExampleURL
|
||||
#banner.image.width= //TODO
|
||||
#banner.image.height= //TODO
|
||||
#banner.image.margin= //TODO
|
||||
#banner.image.invert= //TODO
|
||||
#banner.image.invert= //TODO
|
||||
|
||||
contactInfoType=email
|
||||
@@ -3,39 +3,14 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<title>Customer Page</title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
url: "contactInfoTypes"
|
||||
}).done(function(data) {
|
||||
var contactInfoType = $('#contactInfoType').text();
|
||||
$.each(data,function(key, value) {
|
||||
var o = new Option(value.type, value.type);
|
||||
if (value.type == contactInfoType) {
|
||||
o.selected = true;
|
||||
}
|
||||
$('#expressions').append(o);
|
||||
});
|
||||
});
|
||||
$('#expressions').change(function(){
|
||||
$.ajax({
|
||||
url: "updateContactInfoType",
|
||||
method:'POST',
|
||||
data:{type:$('#expressions').val()}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<br />
|
||||
<form action="customer" method="POST">
|
||||
Contact Info: <input type="text" name="contactInfo" /> <br />
|
||||
Contact Info Type: <select id="expressions" ></select> <br />
|
||||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
<br /><br />
|
||||
<span th:text="${message}"></span><br />
|
||||
<span id="contactInfoType" th:text="${contactInfoType}" style="visibility:hidden"></span><br />
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user