|
|
onresize()?
|
|
|
|
Forum Regular
Join Date: Feb 2004
Location: Manhattan
Status:
Offline
|
|
I have a call in the body tag of a page onresize="functionname()" however the w3c validator keeps kicking it back to me, saying it's not HTML 4.01 transitional. I've also tried window.resize. Any clues? It fires in all browsers I've tested, so it's not an IE only thing.
|
I saw a woman with a sweatshirt that said "Guess", so I said, "Implants?"
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Now that is strange - I didn't know that it wasn't part of the 4.01 specification, but apparently it isn't...
I suppose this hints as to why the events are handled differently in Moz and IE (I think Moz only fires it when the resize has stopped, but IE continuously fires it until you stop...)
I'm just going to find out where it is laid down as a standard, out of interest.
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2004
Location: Manhattan
Status:
Offline
|
|
I've looked. It's not listed in the w3schools event handler list, and not on mozilla's either, yet they support it, as does Netscrape.
|
I saw a woman with a sweatshirt that said "Guess", so I said, "Implants?"
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Well, Netscape would if Mozilla does........
It seems to me that this is a bit like the whole .innerHTML thing. Not a written standard, but widely used because of its usefulness. And it's been around for a hell of a long time (in HTML years), so I wonder why it isn't a proposed standard (or have I just missed it).
I thought it might appear here, but it didn't...
Ho-hum... I'll keep on searching - this is something I never knew about, and I'd really like to find the answer now...
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2004
Location: Manhattan
Status:
Offline
|
|
Thanks. It's the only thing holding up validation of the page. If I remove it, it validates. In fact, if I remove it and add a few /> to empty tags, it validates as XHTML. But this one call is not part of any standard. I've looked everywhere. JS has 13 event handlers listed, and this ain't among em. The only place it shows in on the MS site, but that's it.
(
Last edited by DUNSEL; May 11, 2004 at 11:54 AM.
)
|
I saw a woman with a sweatshirt that said "Guess", so I said, "Implants?"
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Right - apart from SVG methinks onresize as an attribute is nowhere to be found (in w3c standards, that is).
It seems to me that if validation is important, you'll probably need to go with document.addEventListener
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2004
Location: Manhattan
Status:
Offline
|
|
It's really not that important, but as long as JS recognizes the event handler, and HTML 4.01 doesn't,the this might solve the problem:
onresize = function() { whatever () };
Put the call in the script, and to heck with the HTML.
|
I saw a woman with a sweatshirt that said "Guess", so I said, "Implants?"
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2004
Location: Manhattan
Status:
Offline
|
|
Yep, that did it. Validates, and the function still fires. Thanks for caring. LOL!
|
I saw a woman with a sweatshirt that said "Guess", so I said, "Implants?"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|