javascript - Modal pop up after submitting form on the same page -


I'm a whole newbie and I do not know how to do it.

What do I want:

When I click submit on the form of my page, it goes to the servlet and loads the data in the database Again, as a confirmation of the load, it shows a successful model that I want to achieve something in which servlets do not redirect. That's it, it remains on the same page and shows a "Data-Leded Federal" model that pops up.

I am using response.sendRedirect to redirect to another page in my servlet but I do not want to redirect, I would like to be on the same page in which Appears in a pop-up form page.

src =" // code.jquery.com/jquery-1.9.1.js"></script> Lt; script src = "// code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

or < P> 2) Download the files and add them to your website (just like above but the files will be on your domain) Recommended

You & lt; body & gt ; Tags:

  

Edit

  & lt; Script type = "text / javascript" & gt; Function pop_up_modal () {$ ("#modal_popup") .dialog ({height: 140, modal: true, title: "Title of your modal popup", open: function () {$ ("#modal_popup"). "Text that you want in the modal.");}}); }; & Lt; / Script & gt;   

Then you can call pop_up_modal () anywhere on your server.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -