Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting a form from parent to iframe! Pls Help

Status
Not open for further replies.

Forri

Programmer
Oct 29, 2003
479
MT
I have a document and wihtin it i have an iframe.

Within the document i have a button.
Within the iframe i have a form.

I would like to sumbit the form, within the iFrame, when clicking on the butotn found on the parent document!?

I've tried document.iFrameName.formName.submit(); but i keep getting an error!

Tahnks
Nick
 
parent.frames.iFrameName.formName.submit()

Known is handfull, Unknown is worldfull
 
I've tried it and the following error is being given:

parent.frames.docframe.frmList is null or not an object

Thanks
 
From the button in the main page it would be...

var theiframe = document.getElementById("iframeid");
theiframe.document.getElementById("formid").submit();

or

var theiframe = document.getElementById("iframeid");
theiframe.document.formname.submit();

I think either should work....if not post your code please.
Matt

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top