java - How To Load Servlet Result Page in Div? -
i have following situation:
there left side menu in web application, when user clicks link of menu specific page opened in specific div. specific div working content page.
for example there password changing link, when click it, displayed on content div.
every page done .jsp format , each page have error , success pages. example if have changepassword.jsp have changepassworderror.jsp , changepasswordsuccess.jsp, used display error , success messages.
i'm using servlets information , handle , redirect on correct page. example if user want change his/her password , goes fine directed changepasswordsuccess.jsp servlet , if error directed changepassworderror.jsp.
when opened own page it's silly have provide link user return main page. if error message, error page opened own page obvious.
my question how can direct user servlet main page result page of servlet displayed in content div? meaning if user directed success page, success page displayed on main page's content div.
if possible not rather use .php redirection style, includes header tag , inside of there's redirection url.
in case have use ajax loading content div example
function getsummary(id) { $.ajax({ type: "get", url: 'your url', data: "id=" + id, // appears $_get['id'] @ ur backend side success: function(data) { $('#summary').html(data); } }); }
Comments
Post a Comment