Abhijat M

Abhijat M

Wednesday, 27 June 2012

Loading Jquery with RichFaces 4.0 inbuilt File

There is a one line script at the head required to ensure the order of scripts and to allow you to use native Jquery

<h:outputScript name="jquery.js" />

ie6 Jquery Select Labels and IE6

Yes if you have to do it theres this sinppet that resolves an Ie6 bug wherein the selectLabels do not hold their values when clicked from their corresponding label.

More Here: http://support.microsoft.com/kb/314279

 function ie6(){  
  return jQuery.browser.msie && /msie 6\.0/i.test(navigator.userAgent);  
 }  
 function fixIe6SelectLabel(){  
  if(ie6()){  
   jQuery('select').bind({  
    focusin: function(event) {  
     try {  
     var eSrc = event.target;  
     if ( eSrc ) eSrc.tmpIndex = eSrc.selectedIndex;  
     } catch(e) {}  
    },  
    focus: function(event) {  
     try {  
    var eSrc = event.target;  
    if ( eSrc ) eSrc.selectedIndex = eSrc.tmpIndex;  
    } catch(e) {}  
    }  
   });  
  }  
 }  

Sunday, 17 June 2012

Start

Revamping my Tech Space.

Will be posting interesting tech bits here.

watch this space for ruby, rails, java and similar.