I created a popup page using ADF task-flow.
Basically the action of a button triggers the popup window.
It works well on local but when I deploy it to the server and clicked the button, it just refreshes the page and popup window is not displayed.
When you run the page on the server, are you using the proper URL? If you see a "jspx" on the end of your URL, you probably are not. You must run the taskflow view activity and not the page itself. Another common way to confirm if you're doing it wrong: if clicking the button works the second time, then you're doing it wrong :)