All pastes #630987 Raw Edit

Stuff

public text v1 · immutable
#630987 ·published 2007-07-23 16:58 UTC
rendered paste body
   // rexql callbacks
   function rexcbRadio_( r, id ) { // convert r to a rexql value
      var a;

      if ( id == r.other ) {
         a = r.checked ? r.answer : '';
      } else {
         var choices = r.choices;
         for ( var i = 0, n = choices.length; i < n; ++i ) {
            if ( choices[i].checked ) {
               a = choices[i].value;
               break; // break since rexql hits us with one id at a time
            }
         }
      }

@@      var type = typeof( a == 'number' ) ? 'Number' : 'String';

@@      return rexql.value( a, type );
   }