getResponse(); $response->addHeader('Content-Type', 'text/javascript'); return self::get_javascript(); } elseif(!empty(self::$non_ajax_content)) { return self::$non_ajax_content; } elseif(!empty(self::$redirect_url)) { Director::redirect(self::$redirect_url); return null; } else { Director::redirectBack(); return null; } } /** * Caution: Works only for forms which inherit methods from LeftAndMain.js */ static function load_form($content, $id = 'Form_EditForm') { // make sure form-tags are stripped // loadNewPage() uses innerHTML to replace the form, which makes IE cry when replacing an element with itself $content = preg_replace(array('/