Javascript not allow

January 27, 2011 at 15:39:17
Specs: Windows XP
How do I make javascript NOT allow something to happen?


if(px >= 0 && py <= 0)
//Stop it from happening!

It HAS to be possible, but how?

See More: Javascript not allow

Report •

January 27, 2011 at 17:58:03
Generally you return false;

But with some event-driven libraries, that may not work.

If you really want to halt execution, you can try accessing an undefined variable - that will prevent further execution.



...kind of a hack, but I've had to use it before.

Report •
Related Solutions

Ask Question