« Older Entries Newer Entries » Subscribe to Latest Posts

5 Aug 2009

enable submit event on live bindings in jQuery

Posted by havvg. 4 Comments

The live() method is one great new feature of jQuery 1.3, however it does not support binding of the event ’submit’ of forms.

?View Code JAVASCRIPT
$('form').live('submit', function() {
  // your callback
});

This can be simulated by a simple workaround on the selected objects. The click() event can be bound using the live() method. The workaround is simple: do not bind the submit of a form, but the click on any submit button within it.

?View Code JAVASCRIPT
$('input:submit', $('form')).live('click', function() {
  // your callback
});

Tags: ,

29 Jun 2009

single table inheritance pattern in symfony using propel

Posted by havvg. 2 Comments

Rails is doing it, Java is doing it very similar, you can do it in symfony, too: make use of the Single Table Inheritance pattern.

Read the rest of this entry »

26 Jun 2009

dynamic values in forms with symfony

Posted by havvg. No Comments

Let’s imagine you have a form set up and want to add some dynamic values to the object being saved by this form after the form has been submitted by the visitor.

Read the rest of this entry »