View Single Post
Old 10-02-2012, 05:20 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,335
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
Code:
    
    function validation() {
    
        var _qid = "";
        var _msg = "";
    
        var alertValidation = "";
        // Note, this is just so it's declared...
        $("tr.optionAndAnswer").each(function() {
            
            });
              
        if (alertValidation != "") {
            alert(_msg + alertValidation);
            return false;
        }
    
        return true;
    
    }
the jQuery code doesn't apepar to be your issue. yoru validation fucntion, doesnt actually do anything. The code in red, does nothing. the rest of th efunction, the way it is written will always return true as you are never changing the value of alertValidation
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote