How to redirect php output to another iFrame

andy7789
andy7789 used Ask the Experts™
on
Hi everybody,

How can I redirect php output (echo or print) to another iFrame? Very short question...

Thanks

-A-
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You don't. The iframe should make the request to receive the output.

Author

Commented:
No, it is possible to do this and one the ways is as follows:
1) you create a span in the target iFrame
2) create needed text strings with php
3) echo the jscript reference to the span as jscript function

The only thing I am missing is how to reference a content of the span with jscript and trigger the written jscript function. Maybe someone could help
Commented:
hi andy,

it seems you indeed have a javascript problem. you can use the following code in your javascript:

// . . .
window.frames["iframe_name"].document.getElemetById("the_child_window_span").innerHTML = "Sample PHP text";
// . . .

it would help though to know the exact nature of your page so i can be able to help you more.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial