found the solution!
i was doing .select() when i didnt need to so once i remove them from
the 3 lines below, it didnt give the error any more!

function activateBlue(Box){
        //debugger;
        $(Box).select('.box').addClass('active');
}
function deactivateBlue(Box){
        $(Box).select('.box').removeClass('active');
}
function removePreviousFocusedBlueForInput(){
        $('.sprite > .box').removeClass('active');
}
function removePreviousFocusedBlue(CurrentBoxWithInput){
        if(CurrentBoxWithInput != null && $(CurrentBoxWithInput).select
('.box').length > 0){
                //alert('remove input blue input');
                removePreviousFocusedBlueForInput();
        }else{alert('CurrentBoxWithInput = null or length is less than
zero');}
}

On Aug 18, 4:38 pm, Red <tankgir...@gmail.com> wrote:
> I am having trouble figuring out how to correct this error, i think i
> have narrowed it down to what function is causing the issue, since
> once i comment it out, it doent give the error, but the code no longer
> does what its supposted to. Whats weird is that the code works how it
> should even with the error, but i dont want any errors even if they
> arnet effecting anything... well here is the code:
>
> $(document).ready(function(){
>  //every time a textbox is clicked or focused...
>  $('.tbox').bind('click focus',function(){
>   //get the focused textbox's outer border
>   var targetThis                = $(this).parent().parent().parent().parent();
>   HandleBlueMe(targetThis ,true);
>  });
> function HandleBlueMe(CurrentBoxWithInput,blnOn){
>         if(CurrentBoxWithInput != null){
>                 if(blnOn == true){
>                         removePreviousFocusedBlue(CurrentBoxWithInput);
>
>                         activateBlue(CurrentBoxWithInput);
>                 }else if(blnOn == false){
>                         deactivateBlue(CurrentBoxWithInput);
>                 }
>         }}
>
> function activateBlue(Box){
>         //debugger;
>         $(Box).select('.box').addClass('active');}
>
> function deactivateBlue(Box){
>         $(Box).select('.box').removeClass('active');}
>
> function removePreviousFocusedBlueForInput(){
>         $('.sprite > .box').removeClass('active');}
>
> function removePreviousFocusedBlue(CurrentBoxWithInput){
>         if(CurrentBoxWithInput != null && $(CurrentBoxWithInput).select
> ('.box').length > 0){
>                 //alert('remove input blue input');
>                 removePreviousFocusedBlueForInput();
>         }else{alert('CurrentBoxWithInput = null or length is less than
> zero');}}
>
> function GetInputContainer(input){
>         try{
>                 return $(input).parent().parent().parent().parent();
>         }catch(ex){
>                 alert("JAVASCRIPT ERROR FAILED TO GET INPUT CONTAINER:
> "+ex.message);
>         }
>         return null;
>
> }
>
> here is a sample of the HTML that it is using:
>  <div class="sprite inputOne">
>   <div class="box textbox" id="boxOne">
>    <div class="topcorners">
>     <div>
>      <div></div>
>     </div>
>    </div>
>   <div class="middle">
>    <div class="left">
>     <div class="right group1">
>      <input class="inputBox tbox regemail rec" id="Name"
> required="true" title="Full Name"/>
>     </div>
>    </div>
>   </div>
>   <div class="bottomcorners">
>    <div>
>     <div></div>
>    </div>
>   </div>
>  </div>

Reply via email to