02-25-04 02:44 PM
Okay Trevor, let's say I have the following code for view
mode, and use the API to pick up a hidden placeholder
value and populate the "IsChecked" variable:
<html>
<head>
<title>Test</title>
<script language="JavaScript" type="text/javascript">
var IsChecked = "1"; //populated via API
function setcheckbox(){
if (IsChecked == "1"){
document.myform.mycheckbox.checked = true;
}
}
</script>
</head>
<body onload="setcheckbox();">
<form name="myform">
<input type="Checkbox" name="mycheckbox">
</form>
<!-- hidden placeholder would be here -->
</body>
</html>
This is a simple example, but illustrates what I'm doing.
[ Post a follow-up to this message ]
|