Entry
How can I clear my checkboxes in Netscape 6.0 by selecting the browsers reload frame option.
Apr 6th, 2008 19:53
ha mo, Jean-Bernard Valentaten, ginger brown,
Well, I'm not sure whether this is the easiest way, but it sure is a
stable way:
1. You write a function that redirects the frames location when it is
unloaded, like this:
function manipulateURL(queryString)
{
var baseUrl = document.location.href;
document.location.href = document.location.href + "?" +
queryString;
}
and place it in the onUnload handler of the body-tag.
2. You write a function that parses the URL of your document and looks
whether there is a querystring and whether this contains information
on your radiobuttons:
function parseURL()
{
var queryString = document.location.href.split("?");
var queries = queryString[1].split("&");
for (var i = 0; i < queries.length; i++)
{
if (queries(i) == "buttons=off")
{
//set all your radiobuttons to unchecked, e.g.
document.yourForm.yourRadioButton.checked = false;
}
}
queries = null;
queryString = null;
}
and place it in the onLoad handler of the body-tag
That's it. It should do the trick.
HTH,
Jean
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com