Post YOUR actual code. Without that it's impossible to say why it isn't working the way you want it to.