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

onsubmit event #1

Open mainpart opened 11 years ago

mainpart commented 11 years ago

1) i saw in examples that form can be submitted via click event of button. it's not perfect method since we might loose other ways (such as hitting enter on form) - am i right? is there onSubmit way to interfere with form via cjax?

2) i want to create dialog ui windown and load content into it with cjax scripting. is there way to do it - can you help me?

ajaxboy commented 11 years ago
  1. Cjax has recently introduce the 'onkeypress' event, which in a way was designed so that it helps on this kind of cases, so you could associate the 'Enter' Key, with pressing that button and such, and now currently there i no a built-in way to use the OnSubmit event to submit the form.
  2. There is a built in function called "Overlay" and other called "OverlayContent" which are designed specifically for this purpose, http://cjax.sourceforge.net/examples/overlay.php