Link to home
Start Free TrialLog in
Avatar of jlcannon
jlcannon

asked on

Insert a date in a table in an ASP page

I have a web page that is in asp format. It is a simple list  that the names are linked to some folders on a file share. what I would like to do is add another column to the table so out beside each folder name I could insert a date of when the documents need to be reviewed within that folder and a checkbox so when the review happens the owner could click the review box and it would reset the dat out to the next interval so for instance if the date is today and they click the box it will change to be Feb. 12, 2016 is the review frequency is 2 years. is this possible.  I guess I also need to ensure only the person i assign could clikc the button but I think I can handle that by pulling the AD information when they open the webpage but I would only want the checkbox to be visible if it was the person assigned. so for instance we use numbers to identify users here so I only want user 4321 to see the checkbox.
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

I'm not sure what your real question is.  Perhaps post the code you are using and explain where you are stuck.

You can add dates with dateAdd http://www.w3schools.com/vbscript/func_dateadd.asp

theDate = "2/12/2014"
newDAte=dateadd("yyyy",2,theDate) ' = 2/12/2016

Open in new window


LoggedInUser="1234"
theFile =rs("Files") '  /folder/folder/file.pdf
FileOnwer=rs("FileOwner") ' 1234
if cstr(trim(LoggedInUser))=cstr(trim(FileOwner)) then
   response.write theFile& " <input type=""checkbox"">Checkox Info"
end if

Open in new window

Avatar of jlcannon
jlcannon

ASKER

I dont have any code yet but what I know how to do is validate who is on the website by using the active directory look-up and what I am needing to know is if it is possible to based on who is on the website, make a checkbox show or be grayed out and 2 insert a date of 1 year from the date I post the link to the paper and upon that one year if they do not go in and check that it has been reviewed the date will turn red or something similar but if they do go in and review the paper and check the checkbox it will automatically make the date 1 year from the date they check the box.
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you and I will try this once I am back infront of my development computer which will be monday.
This is what I was looking for, thank you.