Subversion Repositories SmartDukaan

Rev

Rev 2235 | Rev 2320 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2235 Rev 2236
Line 76... Line 76...
76
    $("#mobilename").autocomplete({  autoFocus: true, minLength: 3, 
76
    $("#mobilename").autocomplete({  autoFocus: true, minLength: 3, 
77
        source: availableNames
77
        source: availableNames
78
    });
78
    });
79
 
79
 
80
 
80
 
-
 
81
    $('#mobilename').keypress(function(e) {
-
 
82
    	if(e.keyCode == 13) {
-
 
83
    		return compareProducts();
-
 
84
        }
-
 
85
    });
-
 
86
    
-
 
87
    
81
    $("#compare_continue").click(function() {
88
    $("#compare_continue").click(function() {
82
    	var productName = $("#mobilename").val();
-
 
83
    	var productTwo = productIdNames[productName];
-
 
84
    	if(typeof productTwo == 'undefined'){
-
 
85
    		alert("Please select a valid product");
89
    	return compareProducts();
86
    		return;
-
 
87
    	}
-
 
88
    	var productOne = $("#catelog_id").val();
-
 
89
    	window.location = "/compare-mobile-phones?p1="+productOne+"&p2="+productTwo;	
-
 
90
    });
90
    });
-
 
91
 
-
 
92
    function compareProducts(){
-
 
93
		var productName = $("#mobilename").val();
-
 
94
		var productTwo = productIdNames[productName];
-
 
95
		if(typeof productTwo == 'undefined'){
-
 
96
			alert("Please select a valid product");
-
 
97
			return false;
-
 
98
		}
-
 
99
		var productOne = $("#catelog_id").val();
-
 
100
		window.location = "/compare-mobile-phones?p1="+productOne+"&p2="+productTwo;	
-
 
101
	}
91
    
102
    
92
});
103
});
93
 
104
 
94
function changeSignInClass(){
105
function changeSignInClass(){
95
	if(document.getElementById("signinClass").className.indexOf("signin1") > -1)	{
106
	if(document.getElementById("signinClass").className.indexOf("signin1") > -1)	{