Re: How to submit a form in a selecttag

2008-04-04 Thread bibi
I have the solution : use directily prototype Ajax obcjet. $javascriptchange = new Ajax.Updater('colpanier','/photoweb//basket/ view/35', {asynchronous:true, evalScripts:true, parameters:Form.serialize(Event.element(event).form), requestHeaders: ['X-Update', 'colbasket']}) ;

How to submit a form in a selecttag

2008-04-03 Thread bibi
I use ajax and it work very well. form name=basket id=panier method=POST action=?php echo $html- url('/basket/view')? ?php echo $ajax-submit('Save', array('update' = 'divbasket')); ? I need to submit my form with ajax every time a change is used in a select tag. $javascriptchange =

Calculated attribut

2008-01-06 Thread bibi
How can i have a calculated attribut in a model. My example : i hava a shopping_cart_product with 2 attributs : quantity and Unit_price and i want a calculated_price witch is quantity*Unit_price (without store it in database) Can I try an afterFind function ?

Calculated attribut

2008-01-06 Thread bibi
How can i have a calculated attribut in a model. My example : i hava a shopping_cart_product with 2 attributs : quantity and Unit_price and i want a calculated_price witch is quantity*Unit_price (without store it in database) Can I try an afterFind function ?

Re: How code a edit view with a list

2008-01-02 Thread bibi
Or [code] foreach ($params['data']['Basketline'] as $Basketline) { echo $html-input(Backet/Basketline[$i]/quantite, array('size'='4')); [/code] Doesn't work too ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

How code a edit view with a list

2008-01-01 Thread bibi
I have a basket with many lines. I want to display all the line in a form. User can update the quantite of each line. How can i code my view ? I tryed [code] foreach ($params['data']['Basketline'] as $Basketline) { echo $html-input(Basketline/$i/quantite, array('size'='4'))

$html-input and hasMany

2007-12-01 Thread bibi
If i have a simple attribut i can use Using $html-input('Model/ fieldname') I have a hasmany attribut names hasmanyfieldname, and i want to update each row of this attribut in a single form. can i used the $htmlhelper ? foreach ($params['data']['hasmanyfieldname'] as $key=$val) { echo

Get a hasAndBelongsToMany colection a controller

2007-11-29 Thread bibi
I have a model witch use a hasAndBelongsToMany collection class User extends AppModel { var $hasAndBelongsToMany = array( 'Photo' = array('className' = 'Photo', 'joinTable' = 'photo_users', 'associationForeignKey' = 'User_id', 'foreignKey' = 'Photo_id', 'unique' =