Monday, November 08, 2010 at 12:05 AM.

system.verbs.builtins.radio.prefs.checkboxPref

on checkboxPref (prompt, adrboolean) {
	<<Changes:
		<<8/3/02; 8:43:10 PM by JES
			<<Quote characters in addresses were mangling the HTML, so now addresses are url-encoded when generating the form element. When processing a POST, we look for the url-encoded field in the postArgs table.
		<<2/5/02; 11:31:20 AM by PBS
			<<Conditionalized to work in Frontier.
	local (pta = html.getpagetableaddress ());
	if pta^.method == "POST" {
		local (adr = address (string.popFileFromAddress (adrboolean)));
		if system.environment.isRadio { //PBS 02/05/02: conditionalized to work in Frontier
			if defined (pta^.radioresponder.postargs.[string.urlEncode (string.popFileFromAddress (adrboolean))]) {
				adr^ = true}
			else {
				adr^ = false}}
		else {
			if defined (pta^.postargs.[string.urlEncode (string.popFileFromAddress (adrboolean))]) {
				adr^ = true}
			else {
				adr^ = false}}};
	local (checkbox = "<input type=\"checkbox\" name=\"" + string.urlEncode (string.popFileFromAddress (adrboolean)) + "\" value=xxx");
	if adrboolean^ {
		checkbox = checkbox + " checked>"}
	else {
		checkbox = checkbox + ">"};
	return ("<tr><td colspan=\"2\">" + checkbox + " " + prompt + "</td></tr>")}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.