but it will not work as needed . I attach my working code along with this .. pls open index.html in browser
Download File :
There's a lot of stuff going on; it's hard to tell what might be going wrong. I wasn't even sure how to test the code you provided. Can you simplify it at all?