I'm not sure why the code from the blog you linked doesn't work, but you can always just drop this at the top of your code:
確定! 回上一頁