QWaz 0 Junior Poster in Training

Hi,

I am really new to javascript, really starting to learn it now, so be nice. :)

am wondering if it's possible to find out if a user clicks the (X) to close the window or browser?
and also if it's possible to find out if they navigate away from the site either by adding in a new url or click back?

I want to do this so that if someone goes adds something to a shopping cart on a site, and navigate away without signing in, we can let them know that there is still stuff in their cart.

Thanks for your help.

QWaz

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.