Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Submit a form in another frame


Message #1 by "Inge Larsson" <inge.larsson@f...> on Wed, 13 Dec 2000 16:11:51 -0000
Hello all,
I believe that Netscape, with all of its idiosyncrasies, needs the full
URL of the form when submitting a form in another frame via JavaScript.

So in your case : where you were having the form submit with a button in
the parent frame, instead call a JavaScript function (this also provides
you with the ability to do client-side form-handling).  For example, in
the childframe with the form, create a function like this:

function submitdata() {
document.forms["yourformname"].action="http://anysite.com/formpage.asp";
document.forms["yourformname"].submit();
		}

Then whenever you want to submit this form from some event in the parent
frame, simply call this function from the parent frame like this :

parent.yourchildframename.submitdata();

This has worked for me in testing environments, but tell me if you have
any problems as I am working on something similar to this for my company's
website and I need to know of any other problems that may arise.

Later...
Reginald Dawson




--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to javascript as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-javascript-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index