apps/image-search-abstraction-layer/public/imageSearch.js
//enables fields based on what is selected
enables fields based on what is selected
enables fields based on what is selected
function enableInputs() {
  var selected = selection.options[selection.selectedIndex].value;
  if(selected == "query") {
    query.removeAttribute('disabled');
    page.removeAttribute('disabled');
    size.removeAttribute('disabled');
    updateURL();
  } else if(selected = "recent") {
    query.setAttribute('disabled', "true");
    page.setAttribute('disabled', "true");
    size.setAttribute('disabled', "true");
    updateURL();
  }
}
function enableInputs ( ) { var selected = selection . options [ selection . selectedIndex ] . value ; if ( selected == "query" ) { query . removeAttribute ( 'disabled' ) ; page . removeAttribute ( 'disabled' ) ; size . removeAttribute ( 'disabled' ) ; updateURL ( ) ; } else if ( selected = "recent" ) { query . setAttribute ( 'disabled' , "true" ) ; page . setAttribute ( 'disabled' , "true" ) ; size . setAttribute ( 'disabled' , "true" ) ; updateURL ( ) ; } }
enables fields based on what is selected
enables fields based on what is selected