function replaceIfEmpty(fieldID, value){
alert($j('input#'+fieldID.val()));
if ($j('input#'+fieldID).val() == ""){
$j('input#'+fieldID).val(value);
}
}
there's my function, and this is in my controller:
page << "replaceIfEmpty('object_name', '#{t.name}');"
but when all this is invoked, an alert tells me:
RJS error:
TypeError: Object object_name has no method 'val'
even though I'm using jQuery 1.3.2, the docs say .val() isn't new to 1.4 =\