So i want my web page to promt for validation on desktop notifications when it loads. So i added onload in body...
Try adding a semicolon to your onload event inline code:
Check this answer actually...
Webkit notifications requestPermission function doesn't work
You can only use it as part of a response to a user action - i.e. you cannot do it "onload"