Enhance modalframe -- cloned from ctool_ajax_sample module