...

View Full Version : How to Submit Parent Form From Within iFrame



probey20
10-27-2006, 09:19 PM
I've seen lots of related posts about this but they so far haven't solved my problem...

I have a parent page with one long form on it. Inside the parent form is an iframe with a form of its own. The iframe form is housed under another application and has to do its own processing (which I'm not concerned about) and then it needs to submit the parent form. My question is, how do I get the iframe form to submit the parent form?? I've tried a couple different options which don't work:

parent.frameName.document.parentForm.submit();
document.getElementById("iframe").contentWindow.document.parentForm.submit();

Any other ideas?
Thanks!

A1ien51
10-27-2006, 09:27 PM
try it without the document:

parent.frameName.formName.submit();

Also: Is there an error message you get?

Eric

probey20
10-27-2006, 09:47 PM
Eric,
Thanks for the quick reply! Your suggestion didn't QUITE work, but I modified a bit to get it to work:

parent.formName.submit();

The form submits reaaaaally slowly, so I suspect I have some other issues going on, but at least it's submitting now!

Thanks again.

A1ien51
10-27-2006, 10:16 PM
Oh crap, I thought you said your submitting the iframe...yep removing the framename will submit the parent. LOL

Eric



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum