r6769의 자바스크립트 오류 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6770 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-09-01 06:53:05 +00:00
parent c6e637e9e8
commit 592e99f929
2 changed files with 9 additions and 4 deletions

View file

@ -202,7 +202,7 @@
if($output->message) $html .= 'alert("'.$output->message.'");'."\n";
if($output->url) {
$url = preg_replace('/#(.+)$/i','',$output->url);
$html .= 'location.href = "'.$request_url.'common/tpl/redirect.html?redirect_url='.urlencode($url).'";'."\n";
$html .= 'self.location.href = "'.$request_url.'common/tpl/redirect.html?redirect_url='.urlencode($url).'";'."\n";
}
$html .= '</script>'."\n";
return $html;

View file

@ -12,10 +12,15 @@
var args = {};
query_string.replace(/([^=]+)=([^&]*)(&|$)/g, function() { args[arguments[1]] = arguments[2]; });
url = args['redirect_url'];
if(typeof(q)=="undefined" || !q) url = top.location.href.replace(/#(.*)$/i,'');
url = unescape(args['redirect_url']);
if(typeof(q)=="undefined" || !q) url = "../../";
}
if(typeof(opener)!='undefined' && opener) {
opener.location.href = url;
window.close();
} else {
top.location.href = url;
}
top.location.href = url;
</script>
</body>
</html>