Handling Multiple Forms...Please Help!

Results 1 to 3 of 3

Thread: Handling Multiple Forms...Please Help!

  1. #1
    Join Date
    Dec 1969

    Default Handling Multiple Forms...Please Help!

    I have a problem with handling multiple forms.I would appreciate if some one could give me some ideas as to how to go about it<BR>Here goes my question: <BR>I have two tabs : tab1 and tab2 <BR>tab1 is wrapped in a form called frm1 <BR>tab2 is wrapped in a form called frm2 <BR>Upon clicking a tab, the page is loaded in an iframe.These pages are basically user entry forms. <BR>The scenario is: <BR>The user fills info in tab1.He clicks tab2.Upon clicking tab2, two things should happen: It should submit frm1 with all the values entered and also load page for tab2 in the iframe. <BR><BR>I would really appreciate if someone can help me give an example of how to do this. <BR><BR>Many Thanks <BR><BR>Here is my code: <BR><BR>http://mili.home.att.net/html/main.html

  2. #2
    Join Date
    Dec 1969

    Default RE: Handling Multiple Forms...Please Help!

    could you use the body onunload event to fire the form submit?<BR>&#060;body onunload="document.formname.submit()"&#062;

  3. #3
    Join Date
    Dec 1969

    Default When you load the HTML...

    ...page into the IFRAME, have it set a JS variable in the containing page to reference the &#060;FORM&#062;. Something like:<BR><BR> parent.IFrameFormRef = this.document.FormName;<BR><BR>Then change your tab HREF&#039;s:<BR> &#060;A HREF="#" onclick="return selectTab(1,&#039;header_top.html&#039;);" <BR> target="content" class="tablink"&#062;<BR><BR>And, finally:<BR><BR>function selectTab( which, where )<BR>{<BR> IFrameFormRef.action = where;<BR> IFrameFormRef.submit( );<BR> ... change to clicked on tab...<BR> return false;<BR>}<BR><BR>100% UNtested. Just an idea.<BR><BR>You *are* aware that this will probably only work with MSIE browsers?<BR><BR><BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts