?
Solved

Submit Iframe contents from button on parent document

Posted on 2005-03-16
4
Medium Priority
?
441 Views
Last Modified: 2008-02-01
Hi

Have two pages a parent page and a sub (iframe) page.

The subpage contains a long length of user check'ed check boxes.

The parent page contains the submit button.

How to I get the data on Iframe?  It ideally needs to work with GET as well as POST.  

Thanks

Bendecko
0
Comment
Question by:bendecko
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Batalf
ID: 13554944
You could change the submit button in the parent frame to a button

<input type="button">

and then make it submit the form in the iframe.

<input type="button" onclick="document.getElementById('iframeID').document.formName.submit()" value="Submit">

"iframeID" is the id of your iframe

<iframe id="iframeID"....

and "formName" is the name of your form in the iframe

<form name="formName"...
0
 
LVL 19

Expert Comment

by:webwoman
ID: 13555721
Why is it constructed this way?

If the iframe is from a different domain, you WILL NOT be able to get the info on the form. If it's on YOUR domain, that begs the question of why an iframe? Why not an include?
0
 
LVL 32

Accepted Solution

by:
Batalf earned 1000 total points
ID: 13555750
If the reason for using iframe is that you need the ability to scroll, then maybe you could use a div with overflow:auto:

<div style="width:500px;height:500px;overflow:auto">
<!-- Your iframe content here-->
</div>
0
 
LVL 1

Author Comment

by:bendecko
ID: 13558054
Thanks,

I've got to go with the quick and easy solution.  Well spotted,  it was the scrolling functionailty that was required and hence the use of the frame.

Thanks to all for comments.

Bendecko
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question