Ajaxify Form Validation

I’ve had trouble trying to validate jquery ajaxify forms using validation plugin

first I tried hacking onStart event but that would load the hash and fail at validation leaving me with a wrong hash in the URL bar

the thing that worked was hacking into the function that binds the event

I just asked there if the bind was for a form element and if so I called validate function
If it returned false I also returned false and effectively stopped form submission
hashes work fine, forms work fine

anyway, this is the piece of code for anyone interested

if(jQuery(this).is('form')) {
if (!jQuery(this).valid()) {
return false;
}
}

happy hacking :)

Smart Homes

I just read an article at linux journal about smart homes

now, I had no previous experience with smart homes and it sounded intriguing so I gave it a look

the story is simple, you have one master device (actually a wifi router with probably some logic) and a bunch of small devices for various things like dimming lights, turning them on/off, controlling garage door, room movement, security cameras etc.

they work just by plugging it in the socket since it uses wifi for communication

there are also some other details but read that yourself