Thread: return false;
View Single Post
Old Sep 28th, 2007, 2:26 PM   #1
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
return false;

Hi,

I have an ASP.Net file. I have ASP.Net drag and drop validation on many of my fields. I also have a javaScript function I wrote to validate on of the fields and return false if the field doesnt pass then check. It does that perfectly, BUT now that I put that in all my drang and drop validation is ignored, even if the function i wrote returns true.


I could code the validation for all those fields, but would rather not take the time.

<script type="text/javascript">
    
    function validateMe()
    {
         alert('in');
                    
        var highlighted = document.getElementById('highlighted');
        var highlighted_index = highlighted.selectedIndex;
        
        
        if(highlighted.selectedIndex == 0)
        {//if
           alert('x4');
           alert('Please select if the book is highlighted or not.');
           var highlighted_error = document.getElementById('highlighted_error');
           //alter(highlighted_error);
           highlighted_error.style.visibility="visible";
           return false;
           
        }//end if
       return true;
    }// end function
                        
    </script>
paulchwd is offline   Reply With Quote