Debt Consolidation - Submit Articles - Online Advertising - Kamala Harris - Deaf Topics

PDA

View Full Version : How to target iframe using PHP


sajeeshmathew
Jan 7th 2009, 11:29 pm
hai, i am new to php. i have some problem with iframe.please help me

How to pass a message from a parent php page to an iframe in it.I need the data to be processed in frame and got back to parent page to display.

in detail. I have an address lists and and i need to edit it. when i click edit,it has to go to iframe and.After edit in iframe the result to be displayed in parent page.

thanks in advance

sandstorm140
Jan 8th 2009, 5:02 am
Rather than using iframes, i'd suggest using the php include/require function.
Here's how:

<?php include('filename.php'); ?>
or
<?php require('filename.php'); ?>

more information about this function available here:
http://www.php.net/manual/en/function.include.php

absurdtrivia
Jan 8th 2009, 4:05 pm
If you must use an iframe, the only way to update the parent page is with javascript.

When the php page in the iframe is finished loading, you have it call a piece of javascript like parent.getElementById['id'].innerHTML = 'Done processing';

Both the iframe and parent page must be on the exact same domain.