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
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.. !!!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top