Jump to content

Refreshing frame A with script running in frame B.


rgrne

Recommended Posts

Is there some way to do the following:?

I want to have a script running in iframe A that does a <META http-equivalent...> refresh every 10 seconds to to check the status of a text file on the server (using a PHP script serverside).  When the information in the file changes, I want the information in a second iframe B, handled by a different script, to change.

For various reasons I don’t want to do the <META http-equivalent...>  refresh in iframe B itself, because I don’t want that information to be constantly refreshing itself.

Is there such a thing as a “target” statement for <META http-equivalent…. > like there is for links?  I found references to something called “Window-Target” and tried it but that didn’t do anything (at least in Firefox) - it just refreshed frame A no matter what I told it the target was.

If there is no way to do this in HTML, can it be done with Javascript?
Link to comment
Share on other sites

If I understand your question correctly, you want one script constantly checking on a status of something, and then when that item meets your criteria, more information opens up?

No way both items can be in the same frame?

I'll think about ways to do this while you direct me in your question...

S.
Link to comment
Share on other sites

Sort of.  One script constantly checks a simple .txt file to see if it has changed (the change will come from an external source, which will change the .txt file).  When a change occurs, the value of that change is used to change the information being displayed in iframe B. 

Most importantly, the constant checking must be done in a way that does not cause the information in iframe B to keep refreshing every ten seconds.  That would cause the processes that are going on in iframe B to start over at the beginning every ten seconds.  I only want it to refresh when the change is detected, which will probably only happen, on the average, every half hour or so.  Otherwise I could just do a <META...> refresh in iframe B every ten seconds and be done with it. 

I don't really care if this is all going on in the same frame or different frames or no frames at all, as long as I can check the file in the server without constantly refreshing the information that is being displayed.  Thats why I started experimenting with a <META...> refresh being performed in a second iframe.   
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.