Forum Moderators: phranque

Message Too Old, No Replies

Making a <div> not clickable?

         

mudogg80

5:19 pm on Jul 13, 2007 (gmt 0)

10+ Year Member



I'm fairly new to web developing, so please bare with me.

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!

rocknbil

8:49 pm on Jul 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well inherently, a DIV is not a clickable item with any action. I'm presuming you mean links within it?

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.