updated 21 august 2002 | brown | green | blue | grey
daryl croke
research diary
edim 2002

In conclusion:

Three methods where developed that would allow a user to dynamically select a visual style. Below are comparisons stating the advantages and disadvantages. The "viewing" page refers to page containing the visual and aural information (eg home page). The changing page refers to the page that updates the Coldfusion database.

Method One: The external variable page refresh method.

This method is a three-step method.

  1. User selects style link. Goes to coldfusion page.
  2. history.back takes user one step back.
  3. Javascript function renames window and reloads page.

Advantages

Disadvantages

Testing:
Internet Explorer 4.
Macintosh [failed] check history.back and location.reload
PC

Internet Explorer 5.
Macintosh [yes]
PC [yes]

Netscape 4.7
Macintosh [yes]
PC [yes]


Netscape 6
Macintosh [yes]
PC [yes]

Method Two: The internal page refresh method.

The second method developed was an extension of the first. If the window.name property can be tested and renamed why not use the property as a pseudo external variable. This method is the most eloquent method as it is only a one step process. It has the advantage of not requiring an external database or the use of cookies.

This method was a one step process.

  1. User selects style link. Window renamed and page reloads.

Advantages

Disadvantages

Testing:

Internet Explorer 4.
Macintosh [yes]
PC

Internet Explorer 5.
Macintosh [yes]
PC [yes]

Netscape 4.7
Macintosh [failed] check location.reload
PC [yes]

Netscape 6
Macintosh [failed] check location.reload
PC [yes]

The third method developed used a query string and a time stamp to force the viewing page to reload from the server and not the cache.

Method Three: The CGI query string method.

Advantages

Disadvantages

Testing:

Internet Explorer 4.
Macintosh [yes]
PC

Internet Explorer 5.
Macintosh [yes]
PC [yes]

Netscape 4.7
Macintosh [yes]
PC [yes]

Netscape 6
Macintosh [yes]
PC [yes]

On testing it was found that the third method (CGI query string method) was the most reliable on a Macintosh. Method 1 and 2 in Netscape proved unreliable with the probably cause being the location.reload function. More testing was done to find a cross application method of reloading a page. A search was conducted to find an alternative, three possible solutions where downloaded.

onClick='parent.location="javascript:location.reload()"

<a href="javascript:location.reload()" target="_self">reload page</a>

<a href="javascript: window.location.reload()">Reload Window</a>

The third one seemed the most suitable and tested successfully on using Netscape on a Macintosh. The amended code for method two (internal page refresh method) now reads.

<a href="javascript: window.name='medium'; window.location.reload()">medium</a>

The code was also amended for method one (external page refresh method)

<script language="javascript1.2">
function pageNew(){
var myWin=window.name;
if(myWin=='refreshpage')
{
window.name="bret";
var myWin=window.name;
window.location.reload();
}
}
</script>

The only method that seems buggy after the amended code is method one using Internet Explorer 4 on a Macintosh. The probable cause is the browser not recognising the history.back() function.