Solved

PHP iFrame to another server

Posted on 2007-04-02
6
293 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:
Mark Gilbert earned 500 total points
ID: 18836251
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:Mark Gilbert
Mark Gilbert earned 500 total points
ID: 18836264
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
ID: 18836501
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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 18

Expert Comment

by:Mark Gilbert
ID: 18837390
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
ID: 18837405
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:Mark Gilbert
ID: 18837487
Hi Moette, glad I was able to provide you with some assistance.  Have a great day.
0

Featured Post

Industry Leaders: 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

Suggested Solutions

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

730 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