Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   JavaScript and Client-Side Browser Scripting (http://www.programmingforums.org/forum23.html)
-   -   return false; (http://www.programmingforums.org/showthread.php?t=14057)

paulchwd Sep 28th, 2007 3:26 PM

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>



All times are GMT -5. The time now is 2:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC