Eytan,

This technique can be extended to other types of form objects besides checkboxes. For example I've done this with select menus too. The only difference is that instead of responding to an onClick they respond to an onChange. There are a number of javascript "events" that are somewhat analogous to 4D's form events. The two you'll be concerned with are onClick and onChange. If you have any text fields that you want to respond to you may need to also look at onBlur.

The only caveat I can offer is that if you have a complicated form you probably have the potential for a complex built query. Factor in query execution time, round trip time to server and page redraw time and you may end up with an interface where the user can click faster than the system will respond.

hth,

Brad

Aparajita Fishman wrote:

I want to be able to tell the
page to run a Query when the checkbox is selected, when the option on the
drop down is selected. Etc....


Given a checkbox that uses this html, as Brad suggested:

<form name="form1" method="post" action="handleMyComplexPage.a4d">
  <input name="f_rental_status_cb" type="checkbox" value="rented"
   onClick="this.form.submit()" />
</form>

the Javascript code "this.form.submit()" in the onClick attribute of the checkbox WILL submit the form the checkbox is in WITHOUT the need for a submit button at all, much less clicking on one.

Regards,

    - Aparajita

_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/


_______________________________________________ Active4D-dev mailing list [email protected] http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to