Track Changes on a Form

Track Changes on a Form

I have an HTML page that is broken up into two different frames. The left frame acts as a navigation tool. The right frame is the user interface, which consists of a form with different input types. I want to track when a field has changed so I can prompt users if they try to navigate away from this page using the left frame. I can track the changes by using an onchange event, but I can’t seem to trap when they leave the page. I have tried the using the onblur for the page and the window, but I can’t seem to get it right.


You can track when the person tries to navigator to another page, either at frame or window level, using the “onUnLoad” event handler. Use this code in the body tag for a page:

or within a frameset:

Note, though, that the onUnLoad event won’t work with browsers that don’t support Navigator JS 1.1 or higher. However, it should work with Navigator 3.x and up, and IE 4.x and up.

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved