kwilliams
11-14-2003, 09:49 AM
Hello,
I have a page that displays applicants from a DB table named dbo.Employ_Jobs. The value from one field (Application_Date) should be either <NULL>, or contain a date (like 09/18/2003 10:59:42 AM Thu)
If this field is empty, I want to show nothing. But if the field is not empty & it does show a date/time value, I want for there to be a red * displayed. This is what I came up with:
<%
var appdate = (rsAppResults1B.Fields.Item("Application_Date").Value);
if (appdate == ""){
var newdate = "";}
else {
var newdate = "<font color='#FF0000'><b>" + "*" + "</b></font>";
Response.Write(newdate);}
%>
When I add this code to the page, all of the records display the red *, even though only some of them should. I tried changing the == to !=, but that operator doesn't work with this statementfor some reason. I'm not sure why this isn't working, so any & all help is appreciated.
P.S. I would show you an example online, but this page is on our intranet site.
KWilliams
I have a page that displays applicants from a DB table named dbo.Employ_Jobs. The value from one field (Application_Date) should be either <NULL>, or contain a date (like 09/18/2003 10:59:42 AM Thu)
If this field is empty, I want to show nothing. But if the field is not empty & it does show a date/time value, I want for there to be a red * displayed. This is what I came up with:
<%
var appdate = (rsAppResults1B.Fields.Item("Application_Date").Value);
if (appdate == ""){
var newdate = "";}
else {
var newdate = "<font color='#FF0000'><b>" + "*" + "</b></font>";
Response.Write(newdate);}
%>
When I add this code to the page, all of the records display the red *, even though only some of them should. I tried changing the == to !=, but that operator doesn't work with this statementfor some reason. I'm not sure why this isn't working, so any & all help is appreciated.
P.S. I would show you an example online, but this page is on our intranet site.
KWilliams