how to do multiple form action

Results 1 to 2 of 2

Thread: how to do multiple form action

  1. #1
    Join Date
    Dec 1969

    Default how to do multiple form action

    My page is consist of 4 frames.First frame is having a form,and i have to pass the formdata in all remaining frames in within one action.Please reply if anyone has the solutions for it??

  2. #2
    Join Date
    Dec 1969

    Default RE: how to do multiple form action

    Easy to do in JavaScript.<BR><BR>In the frame with the form:<BR><BR>&#060;FORM ... onSubmit="return doAllFrames( this );"&#062;<BR><BR>In all the other frames, *ADD* a *COPY* of that same form, except using all HIDDEN form fields.<BR><BR>Then you write the JS code (this shows just doing one other frame--just copy the code for the other frames):<BR><BR>&#060;SCRIPT&#062;<BR>function doAllFrames( frm )<BR>{<BR>&nbsp; &nbsp; form2 = document.parent.otherFrame.theOtherForm;<BR>&nbsp; &nbsp; form2.field1.value = frm.field1.value;<BR>&nbsp; &nbsp; form2.field2.value = frm.field2.value;<BR>&nbsp; &nbsp; ... etc. ... copying all values ...<BR>&nbsp; &nbsp; form2.submit( ); // submit form in other frame<BR>&nbsp; &nbsp; ... do same for other frames ...<BR>&nbsp; &nbsp; return true; // causes submit in this frame<BR>}<BR>&#060;/SCRIPT&#062;

Posting Permissions

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