Script code
<script type="text/javascript">
function checkStatus(){
var productid=$("#productCode").val();
var Email=$("#productEmail").val();
$.ajax({
type:'post',
data : {Email : Email},
url:'',
}).success(function(status) {
success(status);
});
}
function success(status) {
alert("data is" +status);
if (status != null && status===true) {
alert('Success');
$('#showMessage').show();
$('#showbecomepartnerMessage').hide();
} else {
alert('Error');
$('#showbecomepartnerMessage').show();
$('#showMessage').hide();
}
}
</script>
html messages code :(which i want to display in another jsp)
<div id="showpartMessage" class="2" style="display: none;">
<h5 style="color: #1ea59e;">Email not saved</h5>
</div>
<div id="showMessage" class="2" style="display: none;">
<h5 style="color: #1ea59e;">Email is saved</h5>
</div>
I have an ajax call which returns me true or false value.According to this true or false value i will be showing and hiding the div messages.
I have a jsp layout in which different jsp(components) pages are clubbed(integrated).So my requirement is i want to make a javascript call from a jsp page to another jsp page without opening any new window. Is it possible??any help would be appreciated.
Note : Both the jsp pages are inside same layout ie; clubbed in one another jsp layout.
a.jspis includes inb.jsp?ajaxcall inc.jsp?ajaxcall inc.jspthe result should be displayed in some other jsp pagea.jspits already included inc.jsp. is it correct.