Add to home screen javascript

Hi Friends,

I created login page.When i load this login page in android,iPad,it should ask for add to home screen popup.I tried the following link for implementing that.

it is not working.I need solution for implementing this functionality immediately with sample link or project.Thanks in advance.