Page 1 of 1

How to redirect php output to another iFrame

Posted: Thu Oct 19, 2006 6:56 am
by amir
Hi everybody,

How can I redirect php output (echo or print) to another iFrame?

Thanks

Posted: Thu Oct 19, 2006 7:10 am
by feyd
You don't. The iframe should make the request to receive the output.

Posted: Thu Oct 19, 2006 7:20 am
by Cameri
Well, I suggest you learn AJAX, that's the only way you can do what you are asking.
AJAX stands for: Asynchronous Javascript + XML.

Posted: Thu Oct 19, 2006 7:22 am
by feyd
Cameri wrote:Well, I suggest you learn AJAX, that's the only way you can do what you are asking.
AJAX stands for: Asynchronous Javascript + XML.
I'll have to differ on that. Ajax is not the only solution to performing this as I alluded to in my post.

Posted: Thu Oct 19, 2006 8:03 am
by amir
You don't. The iframe should make the request to receive the output.
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

Posted: Thu Oct 19, 2006 8:06 am
by feyd
That's not redirection of the output in my book, but I already alluded to that avenue previously. If your question is on the Javascript needed, then this thread will be moved.