Solved

How to redirect php output to another iFrame

Posted on 2006-10-19
3
377 Views
Last Modified: 2006-11-18
Hi everybody,

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

Thanks

-A-
0
Comment
Question by:andy7789
3 Comments
 
LVL 14

Expert Comment

by:Aamir Saeed
ID: 17764876
You don't. The iframe should make the request to receive the output.
0
 

Author Comment

by:andy7789
ID: 17765120
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
0
 
LVL 4

Accepted Solution

by:
markdoc earned 500 total points
ID: 17766116
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.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

770 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