javascript - onFocus not calling function in Chrome, safari, FF, working fine in IE* -


here in these piece of code m trying validate fields bycalling function when onfocus... html code below:

<a href="#" onmouseout="mm_swapimgrestore()" onmouseover="mm_swapimage('image4','','./images/search1.gif',1)" onclick="clicksearch('company','branchcode','companynameopr','companyname','isactive')" onfocus="commonsearchvalidation('company','companyname','branchcode','isactive'),chkspecial('company'),chkspecial('branchcode')"> 

the function m calling,,, , function having code below:

function commonsearchvalidation() {   alert("commonsearchvalidation");     var counter=arguments.length;        alert(counter);     var resflag = false;             for(var i=0 ; < counter ; i++)     {         var fvalue = document.getelementbyid(arguments[i]).value;         if(fvalue.trim().length!=0)         {                        resflag = true;         }                        }     if(resflag)     {            return resflag;     }     else     {         alert(enteronefield);         document.getelementbyid(arguments[0]).focus();         return resflag;     } } 

please guys me out..


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -