function showBasicForm( basicType ) {
  // hide the advanced form, header & button
  $( "#advancedSearchForm" ).hide();
  $( "#advancedSearchHeader" ).hide();
  $( "#advancedSearchButton" ).hide();
  
  // show the basic form, header & button
  $( "#basicSearchForm" ).show();
  $( "#basicSearchHeader" ).show();
  $( "#basicSearchButton" ).show();
  
  // carry over advanced fields entered
  var keywordBuffer = "";
  $( ".advField" ).each( function() {
    if( this.value && this.value != "" ) {
      keywordBuffer = keywordBuffer + this.value + " ";
    }
  } );
  
  if( keywordBuffer.length > 0 ) {
    var keywords = keywordBuffer.substr( 0, keywordBuffer.length-1 );
    document.getElementById( "keywords" ).value = keywords;
  }
  
  // set hidden form parameter value
  $( "#searchType" ).val( basicType );
  
  resizeFrame();
}
/*
 * Shows basic form (and hides advanced form) on search and search results
 * screens.  Advanced and basic search form elements need to have the correct
 * ids for this function to work properly.
 */
Shows basic form (and hides advanced form) on search and search results
screens.  Advanced and basic search form elements need to have the correct
ids for this function to work properly.
Shows basic form ( and hides advanced form ) on search and search results screens . Advanced and basic search form elements need to have the correct ids for this function to work properly .
function showBasicForm( basicType ) {
  $( "#advancedSearchForm" ).hide();
  $( "#advancedSearchHeader" ).hide();
  $( "#advancedSearchButton" ).hide();
  $( "#basicSearchForm" ).show();
  $( "#basicSearchHeader" ).show();
  $( "#basicSearchButton" ).show();
  var keywordBuffer = "";
  $( ".advField" ).each( function() {
    if( this.value && this.value != "" ) {
      keywordBuffer = keywordBuffer + this.value + " ";
    }
  } );
  if( keywordBuffer.length > 0 ) {
    var keywords = keywordBuffer.substr( 0, keywordBuffer.length-1 );
    document.getElementById( "keywords" ).value = keywords;
  }
  $( "#searchType" ).val( basicType );
  resizeFrame();
}
function showBasicForm ( basicType ) { $ ( "#advancedSearchForm" ) . hide ( ) ; $ ( "#advancedSearchHeader" ) . hide ( ) ; $ ( "#advancedSearchButton" ) . hide ( ) ; $ ( "#basicSearchForm" ) . show ( ) ; $ ( "#basicSearchHeader" ) . show ( ) ; $ ( "#basicSearchButton" ) . show ( ) ; var keywordBuffer = "" ; $ ( ".advField" ) . each ( function ( ) { if ( this . value && this . value != "" ) { keywordBuffer = keywordBuffer + this . value + " " ; } } ) ; if ( keywordBuffer . length > 0 ) { var keywords = keywordBuffer . substr ( 0 , keywordBuffer . length - 1 ) ; document . getElementById ( "keywords" ) . value = keywords ; } $ ( "#searchType" ) . val ( basicType ) ; resizeFrame ( ) ; }
Shows basic form (and hides advanced form) on search and search results
 screens.
Shows basic form ( and hides advanced form ) on search and search results screens .
// hide the advanced form, header & button // show the basic form, header & button // carry over advanced fields entered // set hidden form parameter value