bitmatix
(Bitmatix)
March 27, 2009, 11:36am
1
I have a form with 10 and more input and select elements, and I want to update all fields, when one of the form elements changes. I've tried a couple of hours to find an elegant solution (one function in controller) to handle this problem, but I couldn't find anything.
In another project (which is not Yii-based) I solved it like doing this with xajax and jQuery:
$("input[@type='text'],select").change(
function() {
xajax_changeElements(xajax.getFormValues('formSearch'));
}
);
the ajax function "changeElements" updates all dropdowns width 1 request.
Is there any solution for doing something like this in Yii?
qiang
(Qiang Xue)
March 27, 2009, 11:51am
2
Why don't you do the same (xajax+jQuery) in Yii? It seems to me this is really about client-side scripting.
bitmatix
(Bitmatix)
March 27, 2009, 12:13pm
3
Quote
Why don't you do the same (xajax+jQuery) in Yii? It seems to me this is really about client-side scripting.
Sounds good
Ok, I will try to integrate xajax into Yii. Hope I’ll get it work
EDIT:
Should xajax be installed into protected/vendors/xajax/ or in protected/extensions/xajax/?
bitmatix
(Bitmatix)
March 27, 2009, 1:43pm
4
Ok, I've installed Xajax under /protected/vendors/xajax/ and I think I've got it working now.
@qiang : I'm quite new to Yii, but at this point I can sait, that I love this framework. Thank you for your fast replies!
why use xajax yii used JQuery and there is no need for use XAJAX
?
i can simple use AJAX with Yii