Administrators Thanked: 265 mal
Maybe hooking into the header would be an option?
To pass the status to JavaScript? Yes, have a look at search.header.php for example.