yii: submit form posting two times

by prettyscripts on 2011-10-24 16:02:00 • 1 comment »

phpxajaxyii

i keep running into the same problem. there are at least 2 rows of data saved everytime a form is saved. it's because of ajax validation! if you're using CActiveForm and set enableAjaxValidation to true, when the form is submitted, it will be posting… more »

Tags: duplicate, form, submit, yii

yii: ajax validation and duplicated data

by prettyscripts on 2010-11-05 12:17:38 • Leave a comment »

yii

when creating a new record, i noticed the new record is duplicated (usually 3x but sometimes 4x, 5x...) it took me a while to realize this is caused by ajax validation. there are 2 things needed to be done from the code generated by gii. in the view… more »

Tags: ajax, duplicate, form, yii

xajax: append form fields and firefox

by prettyscripts on 2009-09-15 14:43:56 • 1 comment »

phphtmlxajax

a case that works in IE but not firefox. supposed there’s form with a few fields. a button to manually adding more fields to the form. these fields are grouped under the same <div> tag. when the fields are added to the form, the original field va… more »

Tags: append, field, form, php, xajax

xajax and radio buttons

by prettyscripts on 2008-10-24 10:28:53 • Leave a comment »

htmlxajax

to display a group of choices to select-only-one as radio buttons, the name and id parameters must be the same for all <input>. the html code: <input type="radio" name="option" id="option" value="1" onclick="xajax_click(this.value);" checke… more »

Tags: form, radio button, xajax

xajax and checkbox

by prettyscripts on 2008-07-03 12:16:33 • 1 comment »

miscjavascripthtmlxajax

in one of the forms i work on, i need to set other form fields based on the value of a checkbox. the value this.checked was passwd a parameter to xajax function.<input type="checkbox" name="checkbox1" id="checkbox1" value="Y" onClick="xajax_functi… more »

Tags: checkbox, form, xajax