Kay Schenk wrote:

> What Daniel would like would be *insanely* uncomplicated if we had a DB 
> backend and could use something like php or Perl cgis to access it.
> 
> However, using JS to do basically DB operations is a nightmare! What 
> happens is all possible entries must be maintained as individual items 
> within the script itself.

NO no no no.

Look at the implementation I proposed. I proposed that tasks lie inside 
<div> tags and that we use the 'id' attribute for the classification.

For example:

<div id='component=writer__difficulty=medium__skill=C'>


So, what the JS has to do is look at the id tags and recognize the 
strings 'component=writer' and the like.  It can probably be done fairly 
cleanly (for JS standards):

 1. For each category, write a function like so:

  function id_component (string str) { 
      // Look for a substring of the form 'component=blah'
      // Return what's on the right of the = sign, or "" if there
      // is no match.
  }

 2. When the user makes a selection:
    a. Grab the contents of each drop-down menu.
    b. Use a loop to go through each id tag in a <div>, like so:

    while ( id_tags_left() ) {
        id = next_id();

        if (  (selected_component  == id_component( id ) )
           && (selected_difficulty == id_difficulty( id) )
           ... )
        {
           make_visible(id);
        }
        else
        {
           make_invisible(id);
        }
    }


Once written, the script remains fixed. What we need to keep current is 
the 'id' attributes, not the script.


> using drop down refinement selections like this is basically ONLY good 
> (read manageable) if you have basically a standard set of options each 
> time. What Daniel is suggesting is a "moving target" of options for 
> these tasks.

No no no. No moving target. The options are fixed. The tasks are *not* 
encoded in the JS. Heaven's no! That'd be crazy. The tasks use 'id' 
attributes inside <div> tags.



> We have NO way for "task masters" to enter in data 
> like this easily without having them go in an actually modify the JS 
> script each time something is added.

:-)   See above.

I did think about this carefully before suggesting it.

Each task master is responsible for maintaining a <div> tag. If they can 
handle the HTML to write the task, I'm sure they can handle the <div> 
tag.  :-)

Cheers,
-- 
Daniel Carrera          | Rigorous reasoning from inapplicable
Join OOoAuthors today!  | assumptions yields the world's most
http://oooauthors.org   | durable nonsense.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to