Forum Moderators: open
Here is my function in the header:
<script language="Javascript">
<!--
function reload_page(){
if (window.location.search == "?showall=1&activeonly=1") {
location='./Status.cgi?showall=1'
} else {
location='./Status.cgi?showall=1&activeonly=1'
}
}
//-->
</script>
and here is where I call the function:
<form method="POST" name="activecheckbox" action="./admin/Admin.cgi" onclick()="reload_page()">
<input TYPE="checkbox" NAME="activeonly" $ActiveCheckBox VALUE="1">Active only
</form>
Note that this is one of three named forms on the page, and that this form, unlike the others, does NOT reside inside a table.
Also, $ActiveCheckBox gets replaced with "CHECKED" if the script is loaded with "./Status.cgi?showall=1&activeonly=1"
Thanks,
Dave A.
function reload_page(entry){
if (entry === true) {
var option = 1
} else {
var option = 0
}
location="./Status.cgi?showall=1&Active=" + option
}
and this as the form:
<form method="POST" name="activeform" action="" onclick="reload_page(activeform.Active[1].checked)">
<input TYPE="radio" NAME="Active" VALUE="0" CHECKED>Show All <input TYPE="radio" NAME="Active" VALUE="1">Active Only
</form>
Found this approach at [home.cogeco.ca...] after much Googling.
DA