Forum Moderators: phranque
Here is what my interface looks like (this is contained within a <div> element, basically like a record in a database, with 4 fields):
"customer1" "7.12.2007" "status" "send email"
Currently I am running a script that will send an email to customer whenever I choose to do so. After I successfully send that email to "customer1", can I make that entire <div> grayed out and not clickable until a certain date has past, like 30 days (this will be handled through database interactivity).
Just to clarify, this <div> would be not clickable until August 12.
Please let me know if you can help!
Thanks!
Just create a linking style and a non-linking style, or if you're using the email link, with or without the actual link. For example, in perl where $expire is the "linkable" value if set to 1:
$expire = 1; ## if your date has passed
$email_link = ($expire==1)?'<a href="mailto:cust@example.com">send email</a>':'not ready';
"customer1" "7.12.2007" "status" "$email_link"
In case you don't understand the shortcut switch,
($expire==1)? <-- if the variable $expire equals one
<a href="mailto:cust@example.com">send email</a> <-- use the first value
:'not ready' <-- otherwise use the second
$email_link = <-- to set the value of the variable $email_link.