Using anchor a href attribute caused exceptions when no html5 mode

Because of that, It is better to use function for redirection.