Solved

PHP iFrame to another server

Posted on 2007-04-02
6
289 Views
Last Modified: 2010-08-05
Hello -
I am new to php and iFrame.  I have a php form that needs to be seen on a website that's server is controlled by our IT department.  I need my form to no appear on the main page, have a link on the navigation bar and show up on a separate target.  I'm not sure where to put the code to make this work.

Here's a portion of my code:
<FORM NAME="horizonsOnApp" ACTION="online_thank_you.php" METHOD="POST" onsubmit="return fieldcheck()">
          <table width="100%" border="0" cellspacing="1" cellpadding="1" name="Form Table" bgcolor="#FFFFFF">
            <tr bgcolor="#0099CC">
The site it needs to iFrame to is http://ebiz.sbc.com/horizons/.  CAN ANYONE HELP?
0
Comment
Question by:moette88
  • 4
  • 2
6 Comments
 
LVL 18

Accepted Solution

by:
ingwa earned 500 total points
Comment Utility
Hi, I may not fully understand your question but from what I have read so far, you would like to put an iframe into your page, and get the form on the main part of the page, to submit to the iframe?  if this is correct, try the following:

<IFRAME SRC="http://ebiz.sbc.com/horizons/" WIDTH=100 HEIGHT=100 frameborder="0" style="border-width:0px" scrolling="no" id="news" name="horizons"></IFRAME>

In your form, change the form tag to the following:

<FORM NAME="horizonsOnApp" ACTION="online_thank_you.php" METHOD="POST" onsubmit="return fieldcheck()" target="horizons">

Basically what I have done here is created an iframe containing a page, in this instance the link you provided and called it horizons.  In the form, I have told the form to use the iframe as the target of the form, so the form will kind of post itself to the iframe, and not refresh the page.  

Hope this helps.
0
 
LVL 18

Assisted Solution

by:ingwa
ingwa earned 500 total points
Comment Utility
Oh, and if you need to link items from the main page into the iframe, simply give each link a target="horizons", such as the following:

<a href="mypagename.php" target="horizons">text for link here</a>
0
 

Author Comment

by:moette88
Comment Utility
Thanks for the help!

I actually need it to do the reverse.  I need to add the Horizons php form to the http://ebiz.sbc.com/horizons/ website, but i do not have access to the http://ebiz.sbc.com/horizons/ coding.  Can that be done?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 18

Expert Comment

by:ingwa
Comment Utility
Hi, if you don't have access to the external websites code, I'm afraid there's no way of changing it's links or targets to different iframes, or even pages for that matter.  Their code I would assume has been specifically coded for their website, and not for external references.

Hope this helps.
0
 

Author Comment

by:moette88
Comment Utility
I appreciate your help.  That is what i was afraid of.

I did test the other solution and it worked well.
0
 
LVL 18

Expert Comment

by:ingwa
Comment Utility
Hi Moette, glad I was able to provide you with some assistance.  Have a great day.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Read about why website design really matters in today's demanding market.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now