Solved

PHP; Submit Button Outside IFrame

Posted on 2008-06-16
2
414 Views
Last Modified: 2008-08-13
Have a CommaCheckboxes form with submit button.

Because of the number of checkboxes, we need to set the form within an IFrame but have the submit button outside the IFrame.

No problem constructing the IFrame but the submit button is of course not working.


<form id="form1" name="form1" method="post" action="r_aportmon.php">
                      <table width="100%" border="0"  class="KT_tngtable ">
                        <tr>
                          <td><label>
                            <input name="button2" type="submit" class="headsubmitthin" id="button2" value="go with the selection" />
                          </label></td>
                        </tr>
                        <tr>
                          <td width="32%"><div class="a-10-b-3c63a2" id="labeltest">
                              <label >
                              <input name="aportID" class="a-10-b-3c63a2"  id="aportID" wdg:recordset="rst_airport" wdg:subtype="CommaCheckboxes" wdg:type="widget" wdg:displayfield="apname" wdg:valuefield="id_ap" wdg:groupby="4" />
                              </label>
                          </div><input name="datano" type="hidden" id="datano" value="5" /></td>
                          </tr>
                        <tr >
                          <td><label>
                            <input name="button" type="submit" class="headsubmitthin" id="button" value="go with the selection" />
                            
                          </label></td>
                        </tr>
                      </table>
                  </form>

Open in new window

0
Comment
Question by:smudgemouse
2 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 500 total points
ID: 21792430
Isn't it useful to use a <div style="overflow:auto"> instead of an iframe?
0
 
LVL 22

Expert Comment

by:neeraj523
ID: 21792483
Hello

You can submit your form in the iframe from the parent form..

like this (on button click)

[iframeName].document.[formName].submit()

where [iframeName] is the name of iframe and [formName] is the name of form in iframe..

neeraj523

0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to refer to value 8 48
Scroll 5 news at a time. 4 27
does post require a form or curl to be post 4 30
How to show span when clicked on? 10 21
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 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