Subversion Repositories SmartDukaan

Rev

Rev 24044 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24044 Rev 24045
Line 34... Line 34...
34
 
34
 
35
    $('input[name$=item_id]').live('change', function() {
35
    $('input[name$=item_id]').live('change', function() {
36
    	var count=0;
36
    	var count=0;
37
    	var that = this;
37
    	var that = this;
38
    	$(this).closest('table').find('tr').each(function(el){
38
    	$(this).closest('table').find('tr').each(function(el){
39
    		if($(that).find('input[name=item_id]').val()==$(this).val()) {
39
    		if($(this).find('input[name=item_id]').val()==$(that).val()) {
40
    			count += 1;
40
    			count += 1;
41
    		}
41
    		}
42
    	});
42
    	});
43
    	if(count==2) {
43
    	if(count==2) {
44
    		alert("item should not be repeated twice");
44
    		alert("item should not be repeated twice");