$jsoutput = $PAGE->requires->js('/lib/ufo.js')->asap();
$jsoutput .= $PAGE->requires->data_for_js('FO', $args)->asap();
$jsoutput .= $PAGE->requires->js_function_call('create_UFO_object', Array($id))->asap();
is a bit too complex for this simple thing and I need to remove the asap anyway