dimanche 19 avril 2015

display second popup form window automatically after first popup form is submitted successfully

I have a pop up register form on the "index.jsp" page. So, if a user fills the register form and submits it, it goes to a servlet and the fields in the form are inserted into a database. After this is processed with no errors, i want a login pop up to show automcatically in the same page, without any links being clicked. How can i do this?


the following is the link that pop's up a register form:



<a id="modal_trigger" href="#modal"><span>Register</span></a>


the following is the div class specifications:



#lean_overlay {
position: fixed;
z-index:100;
top: 0px;
left: 0px;
height:100%;
width:100%;
background: #000;
display: none;
}

.popupContainer{
position:absolute;
width:330px;
height: auto;
left:45%;
top:0px;
background: #FFF;
margin-top: -50px;

}

#modal_trigger {}


the following is the request dispatcher:



rd = request.getRequestDispatcher("**What link should be here???**?");
rd.forward(request, response);


the following is the javascript for the popup form:



$("#modal_trigger").leanModal({top : 200, overlay : 0.6, closeButton: ".modal_close" });

$(function(){
// Calling Login Form
$("#login_form").click(function(){
$(".user_login").show();
return false;
});
// Calling Register Form
$("#register_form").click(function(){
$(".user_login").hide();
$(".user_register").show();
$(".header_title").text('Register');
return false;
});

// Going back to Social Forms
$(".back_btn").click(function(){
$(".user_login").show();
$(".user_register").hide();
$(".header_title").text('Login');
return false;
});

})

Aucun commentaire:

Enregistrer un commentaire