View Single Post
Old 11-16-2003, 03:35 AM   #3
philip
Galvatron
 

Join Date: June 24, 2002
Location: aa
Posts: 2,101
the problem is with a function I wrote, I don't have the actual code here but i can write it generally:

funtion change()
{
parent.{frame name}.location='name.html';
parent.{frame name}.document.write("{a table with text in it}");
parent.{frame name}.document.bgColor="#224466";
}

name.html is a empty html doc with only the background color changed. it has to be called as otherwise I can't get the background colors to work properly.

the first line is my way to refresh the page, as I use this script for all the links in my site, this is necesarry because otherwise the tables are added under each other instead of written a new one.

The problem is that if there's a table in the frame the script sort of stops after the first line (empty page is in the frame now) and needs a second click on the link to write the table. I tried to make this function go off twice when clicked, that worked if there was already a table. if there wasn't a table however it would create a table and put the empty site back in (logical).

I'm searching for refreshing the frame and writing the table in one click on the link, as I doubt everyone notices they have to click twice on the link. I found this line: window.history.go(0);. I'm going to try it, but I doubt it'll work as the history of the frame contains tables as well.

Thans for mentioning refresh, that turned some different results up in google!
philip is offline