FULL STACK   ·   UI   ·   UX   ·   GRAPHICS   ·   DEVELOPER   ·   INSTRUCTOR

Adam Khoury

Donate funds to show love and support

Click the button below to donate funds securely online. You can use your PayPal account or a credit card.

Your donations help free up my time to produce more content and assist in covering server costs. It's also a great way to say thanks for the content!

Application Configuration

Adam will be adding options here soon.

Trap User Check for Unsaved Written Work Tutorial

Published :
Author :
Adam Khoury
Learn to program a Trap user application like YouTube and Facebook have using JavaScript if the user has unsaved work or has not posted text they have composed yet before they try to leave. <!DOCTYPE html> <html> <head> <script> window.onbeforeunload = function(){ var ta = document.getElementById("user_post"); if(ta.value != ""){ return "You have unsaved work!"; } } </script> </head> <body> <textarea id="user_post"></textarea> </body> </html>