Monday, 3 April 2017

sending message from server without reloading current page if password is incorrect otherwise send to client new html page

On my page xxx.xx/index.html i have a form with three inputs (text, password and submit). How can i do something like this:

  1. After button click send form with password and login to server
  2. On server side: if password and login are correct send new page game.html else send 'Incorrect password or login' without refreshing current page (index.html) and put this message on div.

I tried doing this by ajax post but i cant render new page if password and login are correct otherwise if I am doing this by submit form I cant send message from server without refreshing current page (index.html)

Do u have any ideas?



via Caltara Pianista

No comments:

Post a Comment