Bear Bibeault wrote:It's plain HTML by the time it reaches the browser. If you understand that, then I'm not sure that I understand your question.
I'm sorry, I wasn't clear in my statement. I'll try to be clear this time. I'm not a native english speaker, so forgive me for my mistakes and errors. Maybe this
thread should move to the javascript forum ? Because except that I need to place the code inside my template, it has nothing to do with JSP. Some people told me to look for info in JSP forums...
Our web application is used for creating, storing and editing informations about schools. When the user is creating or changing information, there are automatic operations done on the data. If everything is correct, the status of the school will be in valid state. But in specific case, it will be invalid.
My boss wants me to send a message to the user about the remaining invalid schools before closing the application in every way possible. And the principal worry is the browser's X button. We search a way to intercept the browser's events in Javascript.
I must be able to intercept an event like "Before Closing".
Sidd Kulk : So, you think I could intercept the events by using the mouse pointer events ? That means I should detect if the cursor is at the top right corner of the screen and if the mouse left button is down.
That sounds interesting. Could you tell me more about that ? The problems I'm seeing are : Can we know the browser's resolution ? How to calculate the space for the button ? How to handle the tabs in FireFox and Internet Explorer ? They can close the application too.
I think the best solution would be to listen the events themselves. In
java, we can create events listeners. Can't we do something like that in Javascript ?
Thank you all for your help, and I'm sorry to have post that message in the wrong forum.
Editing :
I've look to some examples, and it doesn't seem to be able to detect the pointer when it is outside of the document ?