Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.prefs.popupMenuPref
on popupMenuPref (prompt, adrpref, valuelist, menuitemslist) { <<Changes <<8/20/02; 11:45:02 PM by JES <<If the prompt ends with a question-mark, don't add the colon character. <<8/15/02; 1:54:42 AM by JES <<Created. Run a popup menu preference. local (pta = html.getPageTableAddress ()); local (htmltext); on add (s) { htmltext = htmltext + (s + "\r");}; if pta^.method == "POST" { try { adrpref^ = pta^.postArgs.[string.urlEncode (adrpref)]}}; add ("<tr>"); if not (prompt endsWith "?") { prompt = prompt + ":"}; add ("<td>" + prompt + "</td>"); add ("<td><select name=\"" + string.urlEncode (adrpref) + "\">"); local (i, ct = sizeOf (valuelist)); for i = 1 to ct { local (flSelected = (adrpref^ == valuelist[i]) ); if flSelected { add ("<option value=\"" + valuelist[i] + "\" selected>" + menuitemslist[i] + "</option>")} else { add ("<option value=\"" + valuelist[i] + "\">" + menuitemslist[i] + "</option>")}}; add ("</select></td>"); add ("</tr>"); return (htmltext)}
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.