"Search Form "
Bootstrap 3.3.0 Snippet by Santo83

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row" > <br /><br /> <form id="togglingForm" method="post" class="form-horizontal well"> <div class="form-group"> <div class="col-xs-9"> <input type="text" class="form-control" name="searchTextValue" id="searchTextValue" required data-fv-notempty-message="The company name is required" /> <br /> <label class="radio-inline">Buscar en: </label> <label class="radio-inline"> <input type="radio" name="selection" id="allDocuments" value="AllDocuments" checked='checked' />Todos los documentos </label> <label class="radio-inline"> <input type="radio" name="selection" id="electronicDocuments" value="ElectronicDocuments" />Documentos electrónicos </label> </div> <div class="col-xs-2"> <button type="button" id="buttonSearchBox" class="btn btn-primary" data-toggle="#jobInfo">Search</button> </div> </div> </form> </div> </div>
body { font-family: calibri; }
$(function(){ $("#buttonSearchBox").click(function(){ var urlASearchAll = "http://descubre.uem.es/iii/encore/search/C__S"; var urlBSearchAll = "__Orightresult__U?lang=spi&suite=cobalt" ; var urlASearchElectronic = "http://descubre.uem.es/iii/encore/eds/C__S"; var valueSearch = $("#searchTextValue").val(); var radioValue = $("input[name='selection']:checked").val(); if(radioValue == "AllDocuments"){ var allURLFull = urlASearchAll + valueSearch + urlBSearchAll; window.open(allURLFull); }else{ var allURLFull = urlASearchElectronic + valueSearch + urlBSearchAll; window.open(allURLFull); } }); //press enter on text area.. $("#searchTextValue").keyup(function (e) { if (e.which == 13) { $("#buttonSearchBox").trigger('click'); } }); });

Related: See More


Questions / Comments: