In my Spring Application have Display some Existing Users in Database In Jsp
<a id="details" href="#"class="copyright-text read_link" title="FAQs" onclick="sendForm()";>
<label for="subject">${user.name}</label>
</a>
When we Click above Hyper link one Popup will open and show his Details
And my Controller class i'm mapping action to hyperlink click event.
@RequestMapping(value = "search", method = RequestMethod.POST)
public String header(SearchForm form, BindingResult result,
Model model) throws Exception {
-----
-----
model.addAttribute("SEARCH_RESULT", form);
return "search";
}
So this search.jsp
should display on above popup window.
In this Purpose i'm doing like this..
Prepare ajax form submitting , i'm writing success event so popup.
function ajaxFormSubmit(options) {
$.ajax({
url : options.action,
success : function(data, textStatus, jqXHR) {
$('#' + options.successElem).html(data);
}
},
error : function(jqXHR, textStatus, errorThrown) {
apprise(textStatus +" " + errorThrown);
}
});
}
But this is not working. so is this procedure correct or not ?
Other wise tell me how to Open popup window in Spring ?
According to your code, HTTP method is specified as POST in the @RequestMapping, while GET method is used for sending the ajax request. Is this the cause of your problem?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.