473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Redirect php file

I'm developing a simple chat room box. The main chat room page is
composed of three iframes, one for displaying messages posted, one for
displaying usernames registered online, and the other for typing in
messages. For each iframe there is a php file to handle it. I want to
know once the message is typed in, how to make the message iframe to
refresh and display the newest message. In other word, from one php
file redirected to another php file. I tried include .php, but it
fails because it refresh the wrong iframe ( the iframe for input
messages). Thanks.
Jul 17 '05 #1
4 6469
Echo something like this at the beginning of your page:

<script>
top.frames['name_of_the_frame_you_want_to_refresh'].location.reload();
</script>

Uzytkownik "Yue Zhang" <Jo**********@hotmail.com> napisal w wiadomosci
news:c7**************************@posting.google.c om...
I'm developing a simple chat room box. The main chat room page is
composed of three iframes, one for displaying messages posted, one for
displaying usernames registered online, and the other for typing in
messages. For each iframe there is a php file to handle it. I want to
know once the message is typed in, how to make the message iframe to
refresh and display the newest message. In other word, from one php
file redirected to another php file. I tried include .php, but it
fails because it refresh the wrong iframe ( the iframe for input
messages). Thanks.

Jul 17 '05 #2
"Chung Leong" <ch***********@hotmail.com> wrote in message news:<-5********************@comcast.com>...
Echo something like this at the beginning of your page:

<script>
top.frames['name_of_the_frame_you_want_to_refresh'].location.reload();
</script>

Uzytkownik "Yue Zhang" <Jo**********@hotmail.com> napisal w wiadomosci
news:c7**************************@posting.google.c om...
I'm developing a simple chat room box. The main chat room page is
composed of three iframes, one for displaying messages posted, one for
displaying usernames registered online, and the other for typing in
messages. For each iframe there is a php file to handle it. I want to
know once the message is typed in, how to make the message iframe to
refresh and display the newest message. In other word, from one php
file redirected to another php file. I tried include .php, but it
fails because it refresh the wrong iframe ( the iframe for input
messages). Thanks.

Can you explain to more in detail? The script should be javascript, right?
It should be added to the page that need refresh, right? top.frames is what?
Thanks.
Jul 17 '05 #3
No, you output it in the frame where the inputing occurs. Essentially, the
input frame is telling the message frame to refresh.

And yes, it's Javascript. Stick 'language="javascript"' into the script tag
if you feel like.

Uzytkownik "Yue Zhang" <Jo**********@hotmail.com> napisal w wiadomosci
news:c7**************************@posting.google.c om...
"Chung Leong" <ch***********@hotmail.com> wrote in message news:<-5********************@comcast.com>...
Echo something like this at the beginning of your page:

<script>
top.frames['name_of_the_frame_you_want_to_refresh'].location.reload();
</script>

Uzytkownik "Yue Zhang" <Jo**********@hotmail.com> napisal w wiadomosci
news:c7**************************@posting.google.c om...
I'm developing a simple chat room box. The main chat room page is
composed of three iframes, one for displaying messages posted, one for
displaying usernames registered online, and the other for typing in
messages. For each iframe there is a php file to handle it. I want to
know once the message is typed in, how to make the message iframe to
refresh and display the newest message. In other word, from one php
file redirected to another php file. I tried include .php, but it
fails because it refresh the wrong iframe ( the iframe for input
messages). Thanks.

Can you explain to more in detail? The script should be javascript, right?
It should be added to the page that need refresh, right? top.frames is

what? Thanks.

Jul 17 '05 #4
Chung Leong wrote:
No, you output it in the frame where the inputing occurs. Essentially, the
input frame is telling the message frame to refresh.

And yes, it's Javascript. Stick 'language="javascript"' into the script tag
if you feel like.


And if you want it to be the best practice, use type="text/javascript"
as the language attribute has been deprecated.
--
Randy

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Damo | last post by:
Could someone please help me. I am a newbie at PHP. I downloaded formail.php Version 5.0 from Jacks scripts( http://www.dtheatre.com/scripts/ )and changed the required areas to my email address and...
3
by: Sean Berry | last post by:
Hi there. I am relativly new to Python CGI and need a question answered. I have made custom 404 error pages and have them in various web directories. I have not been able to figure out a way...
6
by: Tim Stokes | last post by:
Hi all, I want to do a similar action to response.redirect ("file.htm"). But the file.htm contains some sensitive data. I have placed file.htm in a folder in the InetPub...
5
by: Steve Lutz | last post by:
Hello, I have a page that creates a class, and then on certain conditions, redirects user to another page. The class has a Class_Terminate() function that saves itself to a database. The class...
8
by: Don Miller | last post by:
I have an ASP script that is called from a PDF form to process form data. On the last line of the script I have a Response.Redirect "webpage.asp" that leads to another target page with actual HTML....
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
3
by: Jed | last post by:
I have written an HttpHandler which I invoke through an ashx page. The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page. Everything...
4
by: news.microsoft.com | last post by:
Hello All, im am new to ASP.NET, so bare with me. i have an application that i am building in stages. stage1 user picks data required stage2 file is written to a virutal directory Stage3...
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.