ajaxboy / cjax

Lightweight Ajax Framework built in PHP with no foot-print. Allows you to build ajax functionality with a single line of code & do so much more, right from the back-end!
http://cjax.sourceforge.net/
66 stars 27 forks source link

Mouse events? #8

Open HallofFamer opened 11 years ago

HallofFamer commented 11 years ago

Hi there, I wonder if mouse events like onmouseover, onmousedown are already possible with CJAX. If not, do you have plans to add them within 1-2 years? I wonder how easy/difficult it is to create a javascript event though, I can give a try myself if it is not so complicated. Thx.

ajaxboy commented 11 years ago

It is not that complicated, I'll get back to you on this one, though perhaps it can also be accomplished with a plugin,you should experiment with that if you'd like in the mean time.

HallofFamer commented 11 years ago

I did a bit of research on mouse events by looking at how the other events are defined in Cjax, and yes it does not seem to be too complex. Still, it seems that there is one major differences for mouse events compared with other events. Mouse events typically pass arguments into the function assigned to on mouse events(at least you pass a variable called this to mouse events like onMouseOver(this)), while others like click, focus and keyboard events normally invoke functions without argument. Not sure whether this makes implementation of mouse events tricky...

ajaxboy commented 11 years ago

A little more research is needed. Generally, you can pass arguments in Cjax and are converted into JavaScript arguments automatically. I'd have to look into it deeper. I won't know until I look into it deeper.