PageSourceSearch

https://www.hindusthansamachar.in/js/genericnewslettersubscribe.js

js hindusthansamachar.in collected 2026-10-02 08:46:05 UTC 2,184 bytes, 116 lines download raw bytes

1/*$(function() {
2      $(".S8NLBtn").click( function()
3           {
4             SendNewsLetterSubscribeData('12013');
5           }
6      );
7});*/
8
9
10$( document ).ready(function() {
11   
12   
13   $(".S8NLBtn").click( function()
14           {
15             SendNewsLetterSubscribeData('3000');
16           }
17      );
18   
19   
20});
21
22function IsSubscValidEmail(email) 
23{
24    var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
25    return expr.test(email);
26}
27
28function SendNewsLetterSubscribeData(langId)
29 {
30		var strLanguageId = "";
31		var strName = "";
32		var strEmail = "";
33		
34		
35		if($(".S8NlName").length>0)
36		{
37			strName = $(".nlName").val();
38		}
39		
40				
41		if($(".S8NlEmail").length>0)
42		{
43			strEmail = $(".S8NlEmail").val();
44		}
45		
46		if(strEmail=="")
47		{
48			alert("Please enter email address");
49			$(".S8NlEmail").focus();
50			return false;	
51		}
52		
53		if (strEmail != "") 
54		{
55			if (!IsSubscValidEmail(strEmail)) 
56			{
57				alert("Please Enter Valid E-mail Address");
58				$(".S8NlEmail").val("");
59				$(".S8NlEmail").focus();
60				return false;
61			}
62		}
63		
64		
65		strLanguageId = langId;
66 
67		$.ajax({
68
69			url: 'https://genericnlsubscibe.sangraha.net/subscribe.ashx',
70			type: 'post',
71			data: { LanguageId: strLanguageId, Name: strName, Email: strEmail},
72			//dataType: "html",
73			success: function (data, textStatus, jQxhr) {
74				if (data != "") 
75				{
76					if(data.indexOf("OK") != -1)
77					{
78						alert("We have received your subscription request");
79						
80					}
81					else
82					{
83						if(data.indexOf("ERROR") != -1)
84						{
85							alert("Some error is occured while subscribing");
86						}
87						else
88						{
89							console.log("NL Response - " + data);							
90						}		
91						
92					}
93					
94					
95					if($(".S8NlName").length>0)
96					{
97						$(".nlName").val("");
98					}
99					
100							
101					if($(".S8NlEmail").length>0)
102					{
103						$(".S8NlEmail").val("");
104					}
105							
106				}
107			},
108			error: function (jqXhr, textStatus, errorThrown) {
109				console.log(errorThrown);
110				
111			}
112		});
113 
114		return false;
115 
116 }

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.