Form inside Form alternative

Wyrlor

New Member
I have a rather strange problem. I know forms within forms are not valid HTML. But i need a solution that allows me to do something simular.
  • I use 'tabifier' javascript library, to create tabs. Different tabs are created by using divs with special id for each tab.
  • I have a main form that is around all tabs like this:\[code\]<form id=......> <div id=...> </div> <div id=...> </div></form>\[/code\]
  • In one of the tabs i need to create a fileupload systems, which makes use of a form. If i place this form outside of the 'main form' it is not displayed in the tab layout, but seperatly.\[code\]<form id=......> <div id=...> </div> <div id=...> </div> <div id='fileuploads'> <form id=......> </form> </div></form>\[/code\]
Is there any way to make this work?
  • I tried moving the fileupload as the last subtab and then ending the main form before the last subtab, but this way the form ends inside the tab div. Which is also not valid html.
  • I'm guessing that document.getelementbyid(div).innerhtml and inserting the form like that would not work aswell.
UPDATE:Thanks for the given answers, although i dont quite understand how to fully implement them. I came up with an other idea. If i just create the fileupload input fields, but not surrounded with a form, and then add a button which calls a js function. This functions places the values of the fileuploads in the 'invisible form' outside the div, and sumbits. Would that be a good solution?
 
Top