I want to add same form in multiple tabs in jsp page, and move from one tab to another tab on submit

StackOverflow https://stackoverflow.com/questions/21775864

  •  11-10-2022
  •  | 
  •  

Question

I have a form in a jsp page like following ..

tab 1 - tab 2 - tab 3
form 1 - form 1 - form 1

I want to display multiple tabs in jsp page. All tabs have a same form to submit. Now i want to move to tab 2 from tab 1 when user submits from tab 1. Which is the best method to deal with this situation?

Was it helpful?

Solution

I think you should submit the first form then move to the second tab then use the ajax to submit the form in background and then using the jquery swtich to the second tab.

Step1: submit first form. (In callback Move to second tab using JQUERY) Setp2: Submit second form, it will not affect first one.

OTHER TIPS

if you want to submit the form immediately on completing the first tab, mean submit the first form then move to the second tab then i will say you have to use the ajax to submit the form in background and then using the jquery swtich to the second tab.

OR

if you want to submit the form at last then hold the first form just switch to second tab then same for second form and switch to third tab and when complete the third form then submit all the forms..

now which one you follow its upto you and your requirements.. !!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top