You are here: Re: DOM event flow « HTML « IT news, forums, messages
Re: DOM event flow

Posted by Michael Winter on 11/25/28 11:48

On 24/05/2006 16:24, Spartanicus wrote:

> Michael Winter <m.winter@blueyonder.co.uk> wrote:

[snip]

>> this.onload = function() {
>> var width = document.body.clientWidth;
>>
>> document.body.onresize = function() {
>> if (document.body.clientWidth != width)
>> location.reload();
>> };
>> };
>
> This works when the viewport width is changed up or down by dragging the
> right viewport border, but not when a non maximised MDI window is
> maximised using the window button, it does work when an MDI window is
> "unmaximized". It works when I close Opera's side panel, but not when I
> open the panel.

Are you absolutely certain of that? I'll admit that I didn't test it
because I forgot that Opera has independent child windows (I always have
them maximised, including pop-ups), but both 7.03 and 8.54 (I didn't
check intervening versions) fire in response to all of those actions,
here. I don't have v9.

[snip]

> I'm not aware of a spec requirement to reevaluate the CSS media query
> upon a window resize, nor am I convinced that it should be.

If a set of rules are applied only because certain circumstances dictate
that they should be, it would seem logical to reconsider the application
of those rules if the circumstances change. It doesn't make a great deal
of sense to continue to apply rules to a document that is in a viewport
say 50em wide, if it's now 30em wide and some other rule set is more
appropriate.

[snip]

> But the main obstacle for me to learn JavaScript is my dislike for what
> is typically done with it (I have it disabled by default in my browser),
> the rare good uses I see for it, which results in only an occasional
> desire to use it.

I can appreciate that, and I most definitely agree that a lot of its use
is poor, and often unnecessary or inappropriate. But, I don't think it
should stand in your way of learning the language.

If you're in no hurry, you might be content to read and post to
c.l.javascript. It is surely the best source of information you'll find
anywhere[1], but a solid understanding of the language will require
quite a lengthy period of involvement. It is deeper than some would like
to make out.

Mike


[1] There are, as ever, people that should be largely ignored
within the group, but they will become obvious fairly
quickly.

--
Michael Winter
Prefix subject with [News] before replying by e-mail.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация