Posts

Showing posts from April, 2015

how to Setup Apache Solr in tomcat

Image
>>  Go hear  to download the latest Java SE Runtime. >>  Download Apache TomCat >> Test tomcat server on your browser, it'll look this way >> Configure tomcat server, goto start  > Monitor TomCat >>  Stop Tomcat server, goto Start > Monitor Tomcat > General Tab> Stop >> Setup Solr Home Directory Download Latest Release of Solr  and unzip it in your local directory i.e. C:\Solr-4.6.0. Go to downloaded Solr folder above (step 1) and Copy solr.war file to Apache webapps folder. I.e. Copy C:\solr-4.6.0\dist\ solr-4.6.0.war  file  to  C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps folder (rename solr-4.6.0.war to solr.war). Create an empty Solr home folder. i.e. C:\solr Go to downloaded Solr folder above (step 1). Copy all files from C:\solr-4.6.0\solr-4.6.0\example\solr folder to C:\solr (Solr home folder). This will be your Solr home folder. Look into ...

SolrException: Unknown commit parameter 'waitFlush'

this problem was there with the older version of SolrNet, please  see this It's the zip file under artifacts.

jQuery Scroll to Top of Page on button click

$("#button").click(function(){ $ ( 'html, body' ). animate ({ scrollTop : '0px' }, 300 ); }); Note : 300 is given to slow down the scroll effect

jQuery AutoComplete Replace Text with Html

$("textbox").autocomplete({                                 minLength: 3,                                 delay: 1000,                                 source: function (request, response) {                                     $.ajax({                                         type: "GET",                                         url: "use your url here",                               ...

Block enter key

function stopRKey(evt) {     var evt = (evt) ? evt : ((event) ? event : null);     var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);     if ((evt.keyCode == 13) && (node.type == "text")) { return false; } } document.onkeypress = stopRKey;

Trigger submit button on enter key press from textbox

$(function(){     $('#textbox').keypress(function (e) {         var key = e.which;         if (key == 13)  // the enter key code         {             $('#submit').click();             return false;         }     }); });

Set or Override Browser Mode and Document mode IE

There are two ways we can achieve it 1. Using meta tag inside <head> tag      < meta http - equiv = "X-UA-Compatiable" content = "IE=edge" > 2. From Web.Config        < system . webServer > <httpProtocol> <customHeaders> < add name = "X-UA-Compatible" value = "IE=edge" /> </ customHeaders > </ httpProtocol > </ system . webServer > Note : Above give code is for IE9