Script: Self-expiring "New" graphic
The code for this is quite simple - but first, here's an example:
First, the graphic itself (you can use any
one you wish):
![]()
This expires on 1st of May 2002
This expires on 1st June 2002
This expires on 1st July 2002
It's easy enough to implement. First copy this code and paste it into the <head> section of your page:
If you want
to use the "new" image we've used, simply right click on this one and select
"save picture as"
For each instance of the "new" graphic, copy and paste this short code snippet where you need it:
Just so you can see how it fits in, here are the three lines with the self-expiring "new" graphic as shown above (saves you doing a "view source"!)
<p class="body">This expires on 1st of May
2002
<script language="Javascript">
<!--
expirenew("05/01/2002")
//-->
</script>
</p>
<p class="body">This expires on 1st June 2002
<script language="Javascript">
<!--
expirenew("06/01/2002")
//-->
</script>
</p>
<p class="body">This expires on 1st July 2002
<script language="Javascript">
<!--
expirenew("07/01/2002")
//-->
</script>
</p>
Note that the script that actually shows (or not) the graphic is between the <p>
</p> tags.
That's all there is to it. Have fun!