Forum Moderators: open

Message Too Old, No Replies

There is no attribute "ONEXIT"

Trying to validate using www.w3.org

         

BillHely

7:14 am on Feb 9, 2005 (gmt 0)

10+ Year Member



Hi all.

I'm using:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

and the body tag looks like this:

<body onexit="exitpop()">

But validator.w3.org objects to this syntax thus:

Line 27, column 13: there is no attribute "ONEXIT"

The onexit javascript code works fine, but I can't find any reference to why validation doesn't like it or what to do about it.

Suggestions please.

SpaceFrog

7:45 am on Feb 9, 2005 (gmt 0)

10+ Year Member



when does onexit trigger versus onblur or onunload?

rocknbil

7:18 pm on Feb 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Pretty sure onexit is an MSIE - only property [msdn.microsoft.com]. Personally I've never heard of it. :-) You should be able to use onUnload instead, but I would check w3c as it may also error on validation (?).

BillHely

11:40 pm on Feb 9, 2005 (gmt 0)

10+ Year Member



OK, thanks guys.

Silly me ... I didn't check, just used it from an example and it worked.

I've changed it to ONUNLOAD and site now validates fine.