PageSourceSearch

https://farmorgo.com/front/js/swapnil.inc.js

js farmorgo.com collected 2026-10-02 00:49:17 UTC 32,854 bytes, 768 lines download raw bytes

1var registraion_flag= submission_flag=1;
2var pattern              = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-])+\.([A-Za-z]{2,4})$/;
3var password = /^(?=.*\d)(?=.*[A-Za-z])[0-9A-Za-z!@#$%]{8,12}$/;
4var alpha_regrex         = /^[A-Za-z ]+$/;
5var alpha_regrex2        = /^[a-zA-Z'-`’]+$/;
6$(document).ready(function()
7{
8  $('#reg_email').blur(function()
9    {   
10    var reg_email      = $("#reg_email").val();
11    $.ajax({
12            url: base_url +'home/emailAreadyExist',
13            type: 'POST',
14            data: new FormData($('#regisrationForm').get(0)),
15            dataType : 'json',
16            processData: false,  // Important!
17                contentType: false,
18                cache: false,
19            success: function (data)
20            {
21                if(data.success=="ok")
22                {
23                    $("#EmailExist_validate").html("");
24                }else
25                {
26                    $("#reg_email").val('');
27                    $("#EmailExist_validate").html("The email already exist field must contain a unique value.");
28                    $("#EmailExist_validate").show();
29                    $("#EmailExist_validate").delay(2000).fadeOut();
30                }
31            }
32        });
33    });
34    $('#registerbtn').click(function()
35     {
36            var Name            = $("#reg_name").val();
37            var LastName        = $("#reg_Lname").val();
38            var email_id        = $("#reg_email").val();
39            var mobile_number   = $("#reg_mob").val();
40            var sign_password   = $("#Sign_password").val();
41            var signConfirmpassword   = $("#Sign_Confirmpassword").val();
42            if(Name ==""){
43                $("#reg_name_validate").html('Please enter first name');
44                registraion_flag=1;
45            }else{
46                registraion_flag=0;
47            }
48            if(LastName==""){
49                $("#reg_Lname_validate").html('Please enter last name');
50                registraion_flag=1;
51            }else{
52                registraion_flag=0;
53            }
54            if(email_id==""){
55                $("#reg_Email_validate").html('Please enter email');
56                registraion_flag = 1;
57            }else{
58                registraion_flag = 0;
59            }
60            if(mobile_number == ""){
61                $("#reg_Phone_validate").html('Please enter phone number');
62                registraion_flag=1;
63            }else{
64                registraion_flag = 0;
65            }
66            if(sign_password == ""){
67                $("#reg_password_validate").html('Please enter password');
68                registraion_flag=1;
69            }else{
70                registraion_flag = 0;
71            }
72            if(signConfirmpassword == ""){
73                $("#reg_Confirmpassword_validate").html('Please enter confirm password');
74                registraion_flag=1;
75            }else{
76                registraion_flag = 0;
77            }
78            if(registraion_flag == 0)
79             {
80                if(Name !='' && LastName !='' && email_id !='' && pattern.test(email_id)== true &&  sign_password.length >=6 && signConfirmpassword !='' && sign_password!='' && signConfirmpassword==sign_password && mobile_number !='')
81                {
82                    $.ajax({
83                        url: base_url +'home/registration_form',
84                        type: 'POST',
85                        data: new FormData($('#regisrationForm').get(0)),
86                        processData: false,  // Important!
87                        contentType: false,
88                        cache: false,
89                        dataType : 'json',
90                        success: function (data)
91                        {
92                            if(data.success=="ok"){
93                                $("#RegistrationSuccessMSG").css({"color": "green", "font-size": "15px", "font-weight": "500", "margin-top": "10px","text-align": "center"});
94                                $("#RegistrationSuccessMSG").html("Registration successful!!");
95                                $("#RegistrationSuccessMSG").show();
96                                $("#RegistrationSuccessMSG").delay(5000).fadeOut();
97                                $("#regisrationForm").trigger("reset");
98                                setTimeout(function()
99                                    { 
100                                        if( data.link )
101                                        {
102                                            window.location= data.link; 
103                                        }else
104                                        {
105                                            window.location= base_url;
106                                        }
107                                    }, 2000);
108                            }else if(data.success=="emailMatch"){
109                                    $("#reg_email").focus();
110                                    $("#reg_email").val('');
111                                    $("#EmailExist_validate").html("The email already exist field must contain a unique value");
112                                    $("#EmailExist_validate").show();
113                                    $("#EmailExist_validate").delay(2000).fadeOut();
114                            }else if(data.success=="mobileMatch"){
115                                    $("#reg_mob").focus();
116                                    $("#reg_mob").val('');
117                                    $("#MobileExist_validate").html("The mobile number already exist field must contain a unique value");
118                                    $("#MobileExist_validate").show();
119                                    $("#MobileExist_validate").delay(2000).fadeOut();
120                            }else{
121                                $("#expert_success").css({"color": "red", "font-size": "15px", "font-weight": "800", "margin-top": "10px","text-align": "center"});
122                                $("#expert_success").html("Something went wrong ,please try again!");
123                                $("#expert_success").show();
124                                $("#expert_success").delay(5000).fadeOut();
125                            }
126                        }
127                    });
128                }   
129            }
130    });
131    $('#addCouponCode').click(function () {
132        var couponID = $('input[name="couponID"]:checked').val();
133        var form = $('#couponSelect')[0];
134        var formData = new FormData(form);
135        var registraion_flag = 0; // Default to 0
136        if (!couponID) {
137            $(".error_couponPop").html('Please select a coupon');
138            registraion_flag = 1;
139        } else {
140            $(".error_couponPop").html(''); // Clear validation error
141        }
142        if (registraion_flag === 0) {
143            $.ajax({
144                url: base_url + 'products/selectCoupon',
145                type: "POST",
146                data: formData,
147                dataType: 'json',
148                processData: false, // Important!
149                contentType: false,
150                cache: false,
151                beforeSend: function () {
152                    $('#load').show();
153                },
154                success: function (data) {
155                    $('#load').hide();
156                    $('.error_couponPop').html(''); // Clear any previous errors
157                    if (data.status === 0) {
158                        $('.error_couponPop')
159                            .fadeIn()
160                            .html("Coupon code invalid!")
161                            .css({ "color": "red", "text-align": "center" });
162                        setTimeout(function () {
163                            $('.error_couponPop').fadeOut("slow");
164                        }, 1000);
165                    } else if (data.status === 1) {
166                        $('.error_couponPop')
167                            .fadeIn()
168                            .html("Coupon code applied successfully!")
169                            .css({ "color": "green", "text-align": "center" });
170                             setTimeout(function () {
171                                // Force a hard refresh like a browser reload
172                                window.location.reload(true);
173                            }, 2000);
174                    } else if (data.status === 2) {
175                        $('.error_couponPop')
176                            .fadeIn()
177                            .html("Coupon code already used!")
178                            .css({ "color": "red", "text-align": "center" });
179                        setTimeout(function () {
180                            $('.error_couponPop').fadeOut("slow");
181                        }, 1000);
182                    } else if (data.status === 3) {
183                        $('.error_couponPop')
184                            .fadeIn()
185                            .html("Coupon code is expired!")
186                            .css({ "color": "red", "text-align": "center" });
187                        setTimeout(function () {
188                            $('.error_couponPop').fadeOut("slow");
189                        }, 1000);
190                    } else if (data.status === 4) {
191                        $('.error_new')
192                            .fadeIn()
193                            .html("Cart value must be greater than the applied coupon code")
194                            .css({ "color": "red", "text-align": "center" });
195                        setTimeout(function () {
196                            $('.error_new').fadeOut("slow");
197                        }, 5000);
198                    }
199                },
200                error: function () {
201                    $('#load').hide();
202                    alert('An error occurred while processing your request. Please try again.');
203                }
204            });
205        }
206    });
207    $("#reg_name").keyup(function()
208    {
209        var name =  $("#reg_name").val();
210        if(name == ""){
211            $("#reg_name_validate").html('Please enter first name');
212        }else{
213          $("#reg_name_validate").html('');
214        }
215    });
216    $("#reg_Lname").keyup(function()
217    {
218        var name =  $("#reg_Lname").val();
219        if(name == ""){
220            $("#reg_Lname_validate").html('Please enter last name');
221        }else{
222          $("#reg_Lname_validate").html('');
223        }
224    });   
225    $("#reg_mob").keyup(function()
226    {
227        var mobile_number = $("#reg_mob").val();
228        if(mobile_number == ""){
229            $("#reg_Phone_validate").html('Please enter phone number');
230             registraion_flag=0;
231        }
232        else if(mobile_number.length !=10){
233            $("#reg_Phone_validate").html('Please enter valid phone number');
234             registraion_flag=0;
235        }
236        else if(mobile_number !=""){
237            $("#reg_Phone_validate").html('');
238        }else{
239            $("#reg_Phone_validate").html('');
240        }
241    });
242    $("#reg_email").keyup(function()
243    {
244        var Email =  $("#reg_email").val();
245        if(Email ==""){
246            $("#reg_Email_validate").html('Please enter email');
247        }else if(pattern.test(Email) == false){
248            $("#reg_Email_validate").html('Please enter valid email id');
249            registraion_flag=0;
250        }else{
251            $("#reg_Email_validate").html('');
252        }
253    });
254    $("#Sign_password, #Sign_Confirmpassword").keyup(function(){
255        var Sign_password =  $("#Sign_password").val();
256        var Sign_Confirmpassword =  $("#Sign_Confirmpassword").val();
257        if(Sign_password != Sign_Confirmpassword){
258            $("#reg_Confirmpassword_validate").html('Passwords do not match!');
259        }else{
260            $("#reg_Confirmpassword_validate").html('');
261        }
262    });
263    $("#Sign_password").keyup(function()
264    {
265        var sign_password =  $("#Sign_password").val();
266        if(sign_password ==""){
267            $("#reg_password_validate").html('Please enter password');
268        }else if(sign_password.length <6 ){
269            $("#reg_password_validate").html('Password length should be greater than 6');        
270        }else{
271            $("#reg_password_validate").html('');
272        }
273    }); 
274    $("#Sign_Confirmpassword,#Sign_password").keyup(function()
275    {
276        var sign_password      =  $("#Sign_password").val();
277        var Sign_Confirmpassword  =  $("#Sign_Confirmpassword").val();
278        if(Sign_Confirmpassword ==""){
279            $("#reg_Confirmpassword_validate").html('Please enter confirm password');
280        }else if(sign_password != Sign_Confirmpassword){
281            $("#reg_Confirmpassword_validate").html('Passwords do not match!');
282        }else{
283            $("#reg_Confirmpassword_validate").html('');
284        }
285    });
286/*..............LogIn form....................*/
287    $('#LoginBtn').click(function()
288     {
289            var username      = $("#username").val();
290            var password      = $("#password").val();
291            if(username == ""){
292                $("#username_validate").html('Please enter phone number');
293                registraion_flag=1;
294            }else{
295                registraion_flag = 0;
296            }
297            if(password == ""){
298                $("#password_validate").html('Please enter password');
299                registraion_flag=1;
300            }else{
301                registraion_flag = 0;
302            }
303            if(registraion_flag == 0)
304             {
305                if(password !='' && username!='' && pattern.test(username)== true)
306                {
307                    $.ajax({
308                        url: base_url +'home/login_form',
309                        type: 'POST',
310                        data: new FormData($('#Loginform').get(0)),
311                        processData:false,
312                        contentType:false,
313                        cache:false,
314                        async:false,
315                        dataType : 'json',
316                        success: function (data)
317                        {
318                            if(data.success=="ok")
319                            {
320                                $("#password_validate").css({"color": "green", "font-size": "15px", "font-weight": "500", "margin-top": "10px","text-align": "center"});
321                                $("#password_validate").html("Login successful!!");
322                                $("#password_validate").show();
323                                $("#password_validate").delay(5000).fadeOut();
324                                $("#Loginform").trigger("reset");
325                                if( data.link )
326                                {
327                                    window.location= data.link; 
328                                }else
329                                {
330                                    window.location= base_url;
331                                }
332                            }else{
333                                $("#password_validate").css({"color": "red", "font-size": "15px", "font-weight": "500", "margin-top": "10px","text-align": "center"});
334                                $("#password_validate").html("Invalid login credentials!");
335                                $("#password_validate").show();
336                                $("#password_validate").delay(5000).fadeOut();
337                            }
338                        }
339                    });
340                }
341             }
342    });
343    $("#username").keyup(function()
344    {
345        var Email =  $("#username").val();
346        if(Email ==""){
347            $("#username_validate").html('Please enter email');
348        }else if(pattern.test(Email) == false){
349            $("#username_validate").html('Please enter valid email id');
350            registraion_flag=0;
351        }else{
352            $("#username_validate").html('');
353        }
354    });
355    $("#password").keyup(function()
356    {
357        var password =  $("#password").val();
358        if(password ==""){
359            $("#password_validate").html('Please enter password');
360        }else{
361            $("#password_validate").html('');
362        }
363    });
364     $('#LoginBtnPop').click(function()
365     {
366            var username      = $("#usernamePop").val();
367            var password      = $("#passwordPop").val();
368            if(username == ""){
369                $("#username_validatePop").html('Please enter email id');
370                registraion_flag=1;
371            }else{
372                registraion_flag = 0;
373            }
374            if(password == ""){
375                $("#password_validatePop").html('Please enter password');
376                registraion_flag=1;
377            }else{
378                registraion_flag = 0;
379            }
380            if(registraion_flag == 0)
381             {
382                if(password !='' && username!='' && pattern.test(username)== true)
383                {
384                    $.ajax({
385                        url: base_url +'home/login_form_pop',
386                        type: 'POST',
387                        data: new FormData($('#LoginformPop').get(0)),
388                        processData:false,
389                        contentType:false,
390                        cache:false,
391                        async:false,
392                        dataType : 'json',
393                        success: function (data)
394                        {
395                            if(data.success=="ok")
396                            {
397                                $("#password_validatePop").css({"color": "green", "font-size": "15px", "font-weight": "500", "margin-top": "10px","text-align": "center"});
398                                $("#password_validatePop").html("Login successful!!");
399                                $("#password_validatePop").show();
400                                $("#password_validatePop").delay(3000).fadeOut();
401                                /*$("#Loginform").trigger("reset");
402                                window.location.href = base_url;*/
403                                setTimeout(function()
404                                    { 
405                                        $("#LoginformPop").trigger("reset"); 
406                                        if( data.link )
407                                        {
408                                            window.location= data.link; 
409                                        }else
410                                        {
411                                            window.location= base_url;
412                                        }
413                                    }, 3000);
414                            }else{
415                                $("#password_validatePop").css({"color": "red", "font-size": "15px", "font-weight": "500", "margin-top": "10px","text-align": "center"});
416                                $("#password_validatePop").html("Invalid login credentials!");
417                                $("#password_validatePop").show();
418                                $("#password_validatePop").delay(5000).fadeOut();
419                            }
420                        }
421                    });
422                }
423             }
424    });
425    $("#usernamePop").keyup(function()
426    {
427        var Email =  $("#usernamePop").val();
428        if(Email ==""){
429            $("#username_validatePop").html('Please enter email');
430        }else if(pattern.test(Email) == false){
431            $("#username_validatePop").html('Please enter valid email id');
432            registraion_flag=0;
433        }else{
434            $("#username_validatePop").html('');
435        }
436    });
437/*................................................................*/
438    $("#profileFname").keyup(function()
439    {
440        var name =  $("#profileFname").val();
441        if(name == ""){
442            $("#profileFname_validate").html('Please enter first name');
443        }else{
444          $("#profileFname_validate").html('');
445        }
446    });
447    $("#profileLname").keyup(function()
448    {
449        var name =  $("#profileLname").val();
450        if(name == ""){
451            $("#profileLname_validate").html('Please enter last name');
452        }else{
453          $("#profileLname_validate").html('');
454        }
455    });   
456    $("#profileMobile").keyup(function()
457    {
458        var mobile_number = $("#profileMobile").val();
459        if(mobile_number == ""){
460            $("#profile_Mob_validate").html('Please enter phone number');
461             registraion_flag=0;
462        }else if(mobile_number.length !=10){
463            $("#profile_Mob_validate").html('Please enter valid phone number');
464             registraion_flag=0;
465        }else if(mobile_number !=""){
466            $("#profile_Mob_validate").html('');
467        }else{
468            $("#profile_Mob_validate").html('');
469        }
470    });
471    $("#profileEmail").keyup(function()
472    {
473        var Email =  $("#profileEmail").val();
474        if(Email ==""){
475        $("#Email_validate").html('Please enter email.');
476        }else if(pattern.test(Email) == false){
477            $("#profileEmail_validate").html('Please enter valid email id');
478            registraion_flag=0;
479        }else{
480            $("#profileEmail_validate").html('');
481        }
482    });
483/*............................Account Details.........................*/
484    $("#currentPassword").keyup(function()
485    {
486        var name =  $("#currentPassword").val();
487        if(name == ""){
488            $("#current_password_validate").html('Please enter current password');
489        }else{
490            $("#current_password_validate").html('');
491        }
492    });   
493    $("#newPassword").keyup(function()
494    {
495        var newPassword =  $("#newPassword").val();
496        if(newPassword == ""){
497            $("#new_password_validate").html('Please enter new password');        
498        }else if(newPassword.length <6 ){
499            $("#new_password_validate").html('Password length should be greater than 6');        
500        }else{
501          $("#new_password_validate").html('');
502        }
503    }); 
504    $("#confirmPassword").keyup(function()
505    {
506        var confirmPassword =  $("#confirmPassword").val();
507        if(confirmPassword == ""){
508            $("#Confirmpassword_validate").html('Please enter confirm password');        
509        }else{
510          $("#Confirmpassword_validate").html('');
511        }
512    });  
513    $("#newPassword, #confirmPassword").keyup(function(){
514        var Sign_password =  $("#newPassword").val();
515        var Sign_Confirmpassword =  $("#confirmPassword").val();
516        if(Sign_password != Sign_Confirmpassword)
517        {
518            $("#Confirmpassword_validate").html('Passwords do not match!');
519        }else
520        {
521            $("#Confirmpassword_validate").html('');
522        }
523    }); 
524    $("#confirmPassword,#newPassword").keyup(function()
525    {
526        var sign_password      =  $("#newPassword").val();
527        var Sign_Confirmpassword  =  $("#confirmPassword").val();
528        if(sign_password != Sign_Confirmpassword){
529            $("#Confirmpassword_validate").html('Passwords do not match!');
530        }else{
531            $("#Confirmpassword_validate").html('');
532        }
533    })
534/*...................Contact us Form...................................*/
535    $('#ConSubmitBtn').click(function()
536     {
537            var Name            = $("#conName").val();
538            var email_id        = $("#conEmail").val();
539            var mobile_number   = $("#conPhone").val();
540            var message         = $("#conMessage").val();
541            if(Name==""){
542                $("#conName_validate").html('Please enter name');
543                registraion_flag=1;
544            }else{
545                registraion_flag=0;
546            }
547            if(email_id=="" && pattern.test(email_id) == false){
548                $("#conEmail_validate").html('Please enter email');
549                registraion_flag = 1;
550            }else{
551                registraion_flag = 0;
552            }
553            if(mobile_number == ""){
554                $("#conPhone_validate").html('Please enter phone number');
555                registraion_flag=1;
556            }else{
557                registraion_flag = 0;
558            }
559            if(registraion_flag == 0)
560             {
561                if(Name !='' && alpha_regrex.test(Name) == true && email_id!='' && pattern.test(email_id)== true && mobile_number !='')
562                {
563                    $.ajax({
564                        url: base_url +'home/conatatUS_form',
565                        type: 'POST',
566                        data: new FormData($('#ContactusForm').get(0)),
567                        processData:false,
568                        contentType:false,
569                        cache:false,
570                        async:false,
571                        dataType : 'json',
572                        success: function (data)
573                        {
574                            if(data.success=="ok"){
575                                $("#SuccessMSG").css({"color": "green", "font-size": "13px","text-align": "center"});
576                                $("#SuccessMSG").html("Thank you for contacting us we will get back to you shortly!!");
577                                $("#SuccessMSG").show();
578                                $("#SuccessMSG").delay(5000).fadeOut();
579                                $("#ContactusForm").trigger("reset");
580                            }else{
581                                $("#SuccessMSG").css({"color": "red", "font-size": "15px", "font-weight": "800", "margin-top": "10px","text-align": "center"});
582                                $("#SuccessMSG").html("Something went wrong ,please try again!");
583                                $("#SuccessMSG").show();
584                                $("#SuccessMSG").delay(5000).fadeOut();
585                            }
586                        }
587                    });
588                }   
589            }
590    });
591     $("#conName").keyup(function()
592    {
593        var name =  $("#conName").val();
594        if(name == ""){
595            $("#conName_validate").html('Please enter name');
596        }else{
597          $("#conName_validate").html('');
598        }
599    });   
600    $("#conPhone").keyup(function()
601    {
602        var mobile_number = $("#conPhone").val();
603        if(mobile_number == ""){
604            $("#conPhone_validate").html('Please enter phone number');
605             registraion_flag=0;
606        }else if(mobile_number.length !=10){
607            $("#conPhone_validate").html('Please enter valid phone number');
608             registraion_flag=0;
609        }else if(mobile_number !=""){
610            $("#conPhone_validate").html('');
611        }else{
612            $("#conPhone_validate").html('');
613        }
614    });
615    $("#conEmail").keyup(function()
616    {
617        var Email =  $("#conEmail").val();
618        if(Email ==""){
619            $("#conEmail_validate").html('Please enter email');
620        }else if(pattern.test(Email) == false){
621            $("#conEmail_validate").html('Please enter valid email id');
622            registraion_flag=0;
623        }else{
624            $("#conEmail_validate").html('');
625        }
626    });
627/*----------------------------------Add to cart Homepage Start---------------------*/
628$('.viewCartHome').on("click", function(){
629        var pID = $(this).attr('rel');
630        var vID = $(this).attr('vid');
631        var dprice = $(this).attr('dprice');
632        var pname = $(this).attr('pname');
633        
634        var form = $('#wishlist_form')[0];
635        var formData = new FormData(form);
636        formData.append("pid", pID);
637        formData.append("varient", vID);
638        formData.append('price', dprice);
639         formData.append('number', 1);
640        $.ajax({
641                  url: base_url+'products/checkCart',
642                  type: "POST",
643                  dataType: "json",
644                  data: formData,
645                  processData: false,  // Important!
646                  contentType: false,
647                  cache: false,
648                  beforeSend: function() {
649                    $('#load').show();
650                  },
651                  success: function(data){
652                    $('#load').hide();
653                    if( data.instock == 1)
654                    {
655                      if( data.qty == 0 || data.qty < 0 )
656                      {
657                        $('.instock').html('').html(data.msg);
658                        $(".viewCartHome").prop('disabled', false); //disable 
659                        
660                        $('.showCartMsg').css('display', 'inline-block').delay(2000).fadeOut();
661                      }else
662                      {
663                        // $('.instock').html('').html( 'only ' +data.qty +' products in stock');
664                        $('.instock').html('').html(data.msg);
665                      }
666                      
667                      
668                      $(".viewCartHome").prop('disabled', false); //disable 
669                       $('.fixedCart').animate({ left: '0px' }, 500); // Open with slide animation
670                        $('.body-overlay').fadeIn(500); // Show overlay
671                        $('body').addClass('no-scroll'); // Disable body scrolling
672                        
673                      $('.shopping_cart').html('').html(data.html);
674                      $('.crt').html(data.count);
675                      //$('.showCartMsg').css('display', 'inline-block').delay(2000).fadeOut();
676                      // window.location.reload();
677                      fbq('track', 'AddToCart', {
678                            content_ids: [pID],
679                            content_type: 'product',
680                            content_name: pname,
681                            value: parseFloat(dprice),
682                            currency: 'INR'
683                        });
684                    }else
685                    {
686                        $('.instock').html('').html( data.msg);
687                         $(".viewCartHome").prop('disabled', false); //disable 
688                       $('.fixedCart').animate({ left: '0px' }, 500); // Open with slide animation
689                        $('.body-overlay').fadeIn(500); // Show overlay
690                        $('body').addClass('no-scroll'); // Disable body scrolling
691                        
692                      $('.shopping_cart').html('').html(data.html);
693                      $('.crt').html(data.count);
694                      //$('.showCartMsg').css('display', 'inline-block').delay(2000).fadeOut();
695                     // $('.showCartMsg').css('display', 'inline-block').delay(2000).fadeOut();
696                    }
697                  },
698            });
699      });
700    
701/*--------------------------------Add to cart Homepage End-------------------------*/
702/*----------------------------------------------------------------------------------------------*/
703 $( '.numberOnly' ).keypress( function ( e ) {//alert($(this).val().length);
704   var unicode = e.charCode ? e.charCode : e.keyCode
705   if ( unicode != 8 ) { 
706     if ( unicode < 48 || unicode > 57 ){ 
707         return false 
708     }
709   }
710});
711 $(document).on('keypress', '.SpaceNot', function(e) {
712    if (e.keyCode == 32) return false;
713});
714});
715 $(document).on('keyup blur','.textalpha',function()
716  {
717  var node = $(this);
718  var varID = $(this).attr('id');
719  $('#' + varID).val( $('#' + varID).val().replace(/[^A-Za-z_\s]/,''), function (str)
720  {
721  return ''; } );
722  }); // (/[^a-z]/g,'' ); });
723$(document).on('click','#printBtn',function(){
724    alert();
725})
726 function printDiv(divName) 
727{
728     var printContents = document.getElementById(divName).innerHTML;
729     var originalContents = document.body.innerHTML;
730     document.body.innerHTML = printContents;
731     window.print();
732     document.body.innerHTML = originalContents;
733}
734$(document).on('click','.favouriteBtn',function(){
735        var productID = $(this).attr('product-id');
736        var sessionID = $(this).attr('session-id');
737        var userID =   $(this).attr('user-id');
738        var form = $('#wishlist_form')[0];
739        var formData = new FormData(form);
740        formData.append("productID", productID);
741        formData.append("sessionID", sessionID);
742        formData.append("userID", userID);
743        $.ajax({
744            url:base_url +'home/favourite_product',
745            type: 'POST',
746            data:formData,
747            processData:false,
748            contentType:false,
749            cache:false,
750            async:false,
751            dataType : 'json',
752              beforeSend: function() {
753            $('#load').show();
754          },
755             success: function (data)
756            {
757              $('#load').hide();
758                if(data.status =='like'){
759                  $('#wishlistbtn_'+productID).addClass('likeme');
760                }else if(data.status =='Dislike'){
761                  $('#wishlistbtn_'+productID).removeClass('likeme');
762                }else{
763                  $('#wishlistbtn_'+productID).removeClass('likeme');
764                }
765                 window.location.reload();
766            }
767           });
768    });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.