https://www.c-span.org/video/?477074-1/president-trump-holds-campaign-rally-nevadas-capital

“);
$(‘nav.channel-finder div’).append(“Channel Finder“);
$(‘nav.channel-finder div’).append(“Found C-SPAN On Your TV“);
$(‘nav.channel-finder div’).append(“”);
if (provider[‘STATUS’][0] == 1)
{
var cspan1 = provider[‘CHANNEL’][0].split(‘,’);
$.each(cspan1, function(index, value) {
cspan1[index] = parseInt(value);
});
cspan1 = cspan1.sort(compareNumbers).join(‘, ‘);
$(‘nav.channel-finder div table’).append(“

C-SPAN Channel ” + cspan1 + ((typeof provider[‘HDCHANNEL’][0] == ‘string’) ? ” & HD ” + provider[‘HDCHANNEL’][0] + “*” : “”) + “

“);
}
if (provider[‘STATUS’][1] == 1)
{
var cspan2 = provider[‘CHANNEL’][1].split(‘,’);
$.each(cspan2, function(index, value) {
cspan2[index] = parseInt(value);
});
cspan2 = cspan2.sort(compareNumbers).join(‘, ‘);
$(‘nav.channel-finder div table’).append(“

C-SPAN2 Channel ” + cspan2 + ((typeof provider[‘HDCHANNEL’][1] == ‘string’) ? ” & HD ” + provider[‘HDCHANNEL’][1] + “*” : “”) + “

“);
}
if (provider[‘STATUS’][2] == 1)
{
var cspan3 = provider[‘CHANNEL’][2].split(‘,’);
$.each(cspan3, function(index, value) {
cspan3[index] = parseInt(value);
});
cspan3 = cspan3.sort(compareNumbers).join(‘, ‘);
$(‘nav.channel-finder div table’).append(“

C-SPAN3 Channel ” + cspan3 + ((typeof provider[‘HDCHANNEL’][2] == ‘string’) ? ” & HD ” + provider[‘HDCHANNEL’][2] + “*” : “”) + “

“);
}
if (hd)
$(‘nav.channel-finder div’).append(“

* Not available in all packages and areas. Please contact your provider if you don’t see C-SPAN on your channel lineup.

“);
}
else
{
$(‘nav.channel-finder’).html(“”);
$(‘nav.channel-finder div’).append(“Channel Finder“);
$(‘nav.channel-finder div’).append(“Your Provider Does Not Carry C-SPAN“);
$(‘nav.channel-finder div’).append(““);
$(‘nav.channel-finder div’).append(“

C-SPAN is carried by these providers:

“);
$.each(window.providers[‘PROVIDER’], function(index, value) {
if (value[‘STATUS’][0] == 1 || value[‘STATUS’][1] == 1 || value[‘STATUS’][2] == 1) {
$(‘nav.channel-finder div table’).append(“

” + decodeURIComponent(value[‘NAME’]) + “

“);
$(‘nav.channel-finder div table tr#’ + index).append(“

“);
if (value[‘STATUS’][0] == 1) {
$(‘nav.channel-finder div table tr#’ + index + ‘ .channels’).html(“C‑SPAN, “+((typeof provider[‘HDCHANNEL’][0] == ‘string’) ? “C‑SPAN HD, ” : “”));
}
if (value[‘STATUS’][1] == 1) {
$(‘nav.channel-finder div table tr#’ + index + ‘ .channels’).append(“C‑SPAN2, “+((typeof provider[‘HDCHANNEL’][1] == ‘string’) ? “C‑SPAN2 HD, ” : “”));
}
if (value[‘STATUS’][2] == 1) {
$(‘nav.channel-finder div table tr#’ + index + ‘ .channels’).append(“C‑SPAN3, “+((typeof provider[‘HDCHANNEL’][2] == ‘string’) ? “C‑SPAN3 HD, ” : “”));
}
}
});
$(‘#request-cspan’).click(function(e) {
$(‘nav.channel-finder’).html(“”);
$(‘nav.channel-finder div’).append(“Channel Finder“);
$(‘nav.channel-finder div’).append(“Request C-SPAN From Your Provider“);
$(‘nav.channel-finder div’).append(“”);
$(‘nav.channel-finder div form’).append(“

“);
$(‘nav.channel-finder div form’).append(“

“);
$(‘nav.channel-finder div form’).append(“

“);
$(‘nav.channel-finder div form’).append(“

“);
$(‘nav.channel-finder div form’).append(“

* Denotes a required field

“)
});
}
}
});
});

function submitRequest()
{
var formData = $(‘#request-cspan’).serializeArray();
var userid = window.providers[‘K2USERID’];
var firstname = formData[0][‘value’];
var lastname = formData[1][‘value’];
var email = formData[2][‘value’];
var message = formData[3][‘value’];
if (validateEmail(email)) {
$.ajax({
type: “POST”,
url: “//www.c-span.org/common/services/getChannel.php”,
data: {userid: userid, firstname: firstname, lastname: lastname, email: email, provider: window.selectedprovider, zip: window.zip, message: message}
}).done(function(data){
if (data == ‘{“STATUS”:”SUCCESS”}’)
{
$(‘nav.channel-finder’).html(“”);
$(‘nav.channel-finder div’).append(“Channel Finder“);
$(‘nav.channel-finder div’).append(“Thank You For Your Request“);
}
});
}
}

function validateEmail($email)
{
var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/;
var ret = true;
if(!emailReg.test($email))
ret = false;
return ret;
}

function compareNumbers(a, b)
{
return a – b;
}

You Might Like
Learn more about RevenueStripe...