rice-middleware/web/src/main/webapp/kew/scripts/feedback.js
// parseName(): parse user name string into first and last name strings
parse user name string into first and last name strings
parse user name string into first and last name strings
function parseName(string)
{
  if(string.length > 0)
  {
    if (string.indexOf(' ') != -1)
    {
      var indSpace = string.indexOf(' ');
      if (indSpace > 0)
      {
        var first = string.substring(0, indSpace);
        document.FeedbackForm.elements['contact.first'].value=first;
        if (indSpace + 1 < string.length)
        {
         var last = string.substring(indSpace + 1, string.length);
         document.FeedbackForm.elements['contact.last'].value=last;
        }
      }
    }
    else
    {
      document.FeedbackForm.elements['contact.first'].value=string.substring(0, string.length);
    }
  }
}
function parseName ( string ) { if ( string . length > 0 ) { if ( string . indexOf ( ' ' ) != - 1 ) { var indSpace = string . indexOf ( ' ' ) ; if ( indSpace > 0 ) { var first = string . substring ( 0 , indSpace ) ; document . FeedbackForm . elements [ 'contact.first' ] . value = first ; if ( indSpace + 1 < string . length ) { var last = string . substring ( indSpace + 1 , string . length ) ; document . FeedbackForm . elements [ 'contact.last' ] . value = last ; } } } else { document . FeedbackForm . elements [ 'contact.first' ] . value = string . substring ( 0 , string . length ) ; } } }
parseName(): parse user name string into first and last name strings
parseName () : parse user name string into first and last name strings
// quit on null string // check for space delimiter // parse first name string into Falcon element // parse last name string into Falcon element // load entire string as first name Falcon element