Thursday, April 16, 2009

How to cause 'div' to behave like a button

Our graphics guys decided that is it a neat idea to use divs instead of normal html buttons at bugsondemand.com. Actually, I prefer buttons but hey.. I'm a stupid man , I would never appreciate a masterpice , a top of the design for me is google.com just boring input and two buttons..

Anyway if you want to let your divs to behave like buttons when the mouse passes over, you need to change the mouse cursor to the pointer

This is how it is done :


<div id="BuyCredits2" style="this.style.cursor='pointer'">
<label style="this.style.cursor='pointer'">Buy Credits</label>
</div>


There are some more pointer options

  • default
  • auto
  • crosshair
  • hand
  • wait
  • help
  • text
  • move
  • n-resize
  • s-resize
  • e-resize
  • w-resize
  • ne-resize
  • nw-resize
  • se-resize
  • sw-resize
  • pointer

Monday, April 13, 2009

Apache Tomcat's Cache Fushing

We have had a problem updating our site content that at the end turned to be Tomcat cache.

Apearently, Apache Tomcat web server hat it own's cache and doenst refresh it too often. we fund that out asking Shahar Zehavi , our new Development Team Leader.

What was done :

  1. Stop the Tomcat
  2. Go to "/home/USERNAME/apache-tomcat-6.0.18/work/Catalina/localhost"
    here are the files that will be deleted.
  3. DELETE : \rm -rf *
I belive that removing the file only will do the job as well , but hey .. when you are putting a new code you should let the old one go ..

please note :
  • you have to change the USERNAME to your coresponding username
  • be careful deleting
Good luck