Reload browser window after POST without prompting user to resend POST data

后端 未结 14 2056
盖世英雄少女心
盖世英雄少女心 2020-11-29 05:47

When a user visits my website there is a \"Login\" link on every page. Clicking this uses some JavaScript to show an overlay window where the user is prompted for their cred

14条回答
  •  爱一瞬间的悲伤
    2020-11-29 06:06

    This worked

    
    

    The reason it doesn't work without the return false; is that the button click would trigger a form submit. With an explicit return false on it, it doesn't do the form submit and just does the reload of the same page that was a result of a previous POST to that page.

提交回复
热议问题