Neatware  Header

Style

With for iteration we can write the _option commands of _select in short.

public void InputInfo() 
{
  _p();
    quote( "Prefix:" );
    _select( "title='Prefix' name='prefix'" );
      String[] ls = {"Mr.", "Mrs.", "Ms"};
      for(int i=0; i<ls.length; i++) {
        e = ls[i];
        _option( "value='" + e + "'" );
          quote( e );
        option_();
      }
    select_();

input first name to fname and last name to lname.

    quote( "First Name:" );
    __input( "title='First' name='fname'" );
    quote( "Last Name:" );
    __input( "title='Last' name='lname'" );
  p_();
}	

template specifies the reactions for all the cards in a deck.

wmlHeader();
_wml();
  _template();
    _do( "type='accept' label='Done'" );
      __go( "href='#end'" );
    do_();
  template_();	

the _do type in a card will override the same _do type in the template.

  _card();
    _do( "type='accept' label='Next'");
      __go( "href='#c1'" );
    do_();

onpick specifies the hyperlink of a selection.

    _p( "mode='nowrap'" );
      quote( "Styles" );
      _select();
        _option( "onpick='#c1'" ); 
          quote( "Unordered" );
        option_();
        _option( "onpick='#c2'" ); 
          quote( "Ordered" );
        option_();
      select_();
    p_();
  card_();

c1 is an unordered card and c2 is ordered card.

  // unordered card
  _card( "id='c1' title='Employee' ordered='false'" );
    InputInfo();
  card_();

  // ordered card
  _card( "id='c2' title='Employer' ordered='true'" );
    InputInfo();


  card_();

'options' key clears all the variables.

  _card( "id='end'" );
    _do( "type='options' label='Clear'" );
      _refresh();
        __setvar( "name='prefix' value=''" );
        __setvar( "name='fname' value=''" );
        __setvar( "name='lname' value=''" );
      refresh_();
    do_();

display variables $prefix, $fname, and $lname.

    _p( "align='center'" );
      quote( "Welcome!" );
      __br();
      quote( "$prefix $fname $lname" );
    p_();
  card_();
wml_();
Table < Previous Next > Password