reload loop

L

lev

I have a page of three frames. Two frames ( 1) name and 2) datatype
selection) serve to set up the particular results to be displayed on a
third frame. One of the possible displays is a graph of my data via a
gd graph. Since the three frames are cgi files and the frameset for
the whole page is htm, the graph had to be written to a file in an
html directory (from perl in the third frame cgi file) and then called
via a javascript function to the third display frame.
My first problem was that when overwriting the graph file for a new
graph, calling the graph resulted in the display of the previous graph
until the page was refreshed (via the toolbar button and a subsequent
box cleared with Retry, resending data to server, or Cancel). So, I
then added a reload() command after the 'graph call' in the same
javascript function and while in the original window, this seemed to
solve the problem. However, when opening the window again, a new
problem arose. Now, when clicking the button to the third frame
javascript to call the newly (overwritten) graph, the refresh box
comes up. Clearing the box, returns me to the javascript button, but
the box appears again when I again click the button. I get struck in
a loop. (I must comment out and uncomment back in the reload() command
to break the loop and continue work.)
The sequence in the script goes:

With more detail, the program precedes as follows:
Select datatype (frame 1)
Select name (frame 2) and click GO (submits frame 3 to server)
Get mysql data to gd graph (@Plot) (frame 3)
Overwrite png file in html directory (frame 3):
open(IMG,'>/home/larryvar/safety/html/simplegraph.png') or die
binmode IMG;
; print IMG $graph->plot(\@Plot)->png
; close IMG
Activating javascript button (highlighted 'View Plot')
print "\<A HREF=\"javascript:gdgraph()\" \>View Plot!\<\/A\>

var filgraph ='http://bioinfo.weizmann.ac.il/safety/simplegraph.png';
function gdgraph(){
location.replace(filgraph);
parent.result_frame.location.reload();
}
Graph displays in 3rd result frame

That's it. Then, to clear for another graph a button in the 2nd frame
is used.
'Plot-reset' activates the javascript function restore():
function restore() {
var rest = 'http://bioinfo.weizmann.ac.il/safety/selectfram.htm';'
;( parent.top.location.replace(rest
{

Might someone see how to get me out of this 'View Plot' –Refresh Box
Loop when I open the window to my site?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top