Function ItemForm::category_select() generate a select html element with class and id catId.
<select name="catId" id="catId">
....
</select>
You can add jquery code like this:
$("#catId").change(function(){
var cat_id = $(this).val();
if(cat_id != '') {
alert('Category Id : ' + cat_id );
}
});
You can add this code directly to the theme page, or via hook wrapping the previous code into a function.
<?php
function _add_javascript() {
if(Params::getParam('page')=='items' &&
(Params::getParam('action')=='post' || Params::getParam('action')=='item_edit') ) {
?>
<script>
$("#catId").change(function(){
var cat_id = $(this).val();
if(cat_id != '') {
alert('Category Id : ' + cat_id );
}
});
</script>
<?php
}
}
?>
<?php osc_add_hook('footer', '_add_javascript'); ?>