Solved

How to redirect php output to another iFrame

Posted on 2006-10-19
3
385 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: 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

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

738 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