My problem is our application requires client certificates. All I'm doing is retrieving the number of days left on the certificate and passing that into this little script.
<%
dim cert_days
cert_days = DateDiff("d", Now, Request.ClientCertificate("ValidUntil"))
%>
<script language="JavaScript1.2">
var days_left = "<%=cert_days%>";
function cert_date_check() {
if (days_left <= "15")
{
alert("Your certificate is only good for " + days_left +" more days.\nContact XXXXXXXX at (xxx) xxx-xxxx to request a new certificate");
}
}
</script>
My question is how do I compare the numbers correctly? Currently it will alert the user if they have 149 days or less left on the certificate.
Any help greatly appreciated!
John
<%
dim cert_days
cert_days = DateDiff("d", Now, Request.ClientCertificate("ValidUntil"))
%>
<script language="JavaScript1.2">
var days_left = "<%=cert_days%>";
function cert_date_check() {
if (days_left <= "15")
{
alert("Your certificate is only good for " + days_left +" more days.\nContact XXXXXXXX at (xxx) xxx-xxxx to request a new certificate");
}
}
</script>
My question is how do I compare the numbers correctly? Currently it will alert the user if they have 149 days or less left on the certificate.
Any help greatly appreciated!
John