I have a Yii CActiveForm backed with a CFormModel and I'm using the onChange htmlOption to call the javascript send(). The send function tweeks some of the form variables and populates a hidden field ready for form serialising and POSTing back to the server.
My problem is that I don't know how to reference the form fields from inside the javascript function using jQuery because the CActiveForm changes their names. Currently I'm having to hard code the names eg $('#SearchForm_myvar').val("myval"); which doesn't seem right.
How can I reference the form variables inside the javascript code?