Once again, please forgive me for asking this here... please know that I am a long-time member of the Milonic family (I own a half dozen licenses), and I now a lot of knowledgeable people frequent the Milonic boards.
This does have something to do with the Milonic menu, as the form in question is powered by the menu to populate some very long "virtual" pull-down menus. (Andy assisted me with this a few years back.)
Anyway, I have a form which can be saved (Perl script that saves to a database) and later edited.
When restoring data to the form, text fields are easy.
There is a simple (existing) JavaScript which restores an option that was selected from a pull-down (select one) menu:
Code: Select all
for (var q=0;q<document.Simple.Color.options.length;q++) {
if (document.Simple.Color.options[q].value == document.Restored.Color.value)
{ document.Simple.Color.options[q].selected = true; break; }
Code: Select all
for (var q=0;q<document.Simple.Color.options.length;q++) {
if (document.Simple.Color.options[q].value == document.Restored.Color.value)
{ document.Simple.Color.options[q].checked = true; break; }
~Wayne