Re: Clear all optgroups and options from a select list
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 10 Aug 2006 18:34:18 +0100
darwinist wrote:
Richard Cornford wrote:<snip>
<snip>The example you gave was an example that required each
optgroup element to have and ID, that would be the
wrong thing to do.
So you did, sorry. Weren't we discussing the clarity/readability of
javascript source code recently?
<snip>
For example:
http://darwinist.googlepages.com/htmldesktop.html
Feel free to criticise
You have never actually said what this thing is supposed to
be for.
It's to demonstrate all you need to know to start making
your own web-based desktop system, or any subset thereof
(a windowed-based application, for example).
Now there is a frightening notion. I didn't look at your actual code too
much, I just verified that it did have the serious memory leak I was
expecting on IE, did not address the select element issue, and that you
could not drag one window over the contents of another because the mouse
co-ordinates were not available in the containing frame (that is, it
failed on the three primary issues of an in browser 'windowing' system
in IE). I suspect that much else that would be useful in any actual
application would also be missing, such as an ability for code executing
in a 'window' to respond to window dragging, re-sizing, closing and
focusing (moving to the front) actions.
It's far from perfect but it includes all
basic functionality required, plus an "immediate"
box, and a manual.
It looks like it is indented to be the bases for an
in-browser windowing system for web-applications. It
doesn't look capable enough for any actual example of
such,
Under Help->Examples there are several working examples
for making windows, making objects draggable, a hello
world program, etc.
There is quite a gap between 'hello world' and a web application
multi-facetted enough to warrant a windowing GUI.
Also the windowing system itself works, as does the
desktop.
but I suppose could be extended for specific
applications. However, as it is only really suited
for Mozilla/Gecko browsers as it stands
There isn't any browser-specific code, and although it's
not coded to an apparently well-known ie bug,
At least two well known IE bugs, but the number doesn't matter as any
one is sufficient to make the result viable for use on Windows IE only
Intranets, or multi-browser Intranets that include IE (i.e. the actual
market) for as long as your "I'm not particularly interested in coding
to the bugs of a product whose manufacturers don't even pretend it's
good anymore" stands.
it's fairly lightweight and quite
responsive in either major browser.
Maybe as it stands, but an actual application would be expected to have
something going on in those windows, which is what will slow the total
down.
(Incidentally "either major browser" sounds like the 'both browsers'
attitude prevalent at the end of the last century.)
I don't see it being of much practical benefit in
a world where IE support is normally expected (and
sometimes sufficient).
It's meant as a free codebase. I've seen nothing really
that does all desktop-environment stuff in a short, free,
clear fashion. Most is heavy or proprietary, or both, and
most try to reinvent the wheel.
There is the dilemma; if you attempt to anticipate and provide all that
an application may need the result will be 'heavy', and much of what is
included will be unnecessary in any real application, but so long as it
is omitted all you have is a demonstration that it is possible to drag
and re-size IFRAMEs in a container of some sort on a particular set of
browsers.
or contribute.
You don't appear to be someone who takes advice, so
anything approaching collaboration is out of the question.
I appreciate your advice, even if you don't like what I do
with it. I happen to consider that what "works" is very
important.
My long experience of people declaring that something "works" or
"doesn't work" on this group has diminished the significance of the
word. So many things "work", by some criteria or another, that 'works'
is barely the starting point for a choice of implementation strategies.
Much of the time people are declaring things to 'work' only because they
have not tested them vigorously/seriously. Indeed you don't seem to have
tried stressing your code much, as the two megabyte memory leak in IE
per window instance should have become evident once you had opened and
closed 100 windows or so.
Javsacript specs are what browsers should implement, but
actual browser support is what programmers need to worry
about.
The two are far too interrelated for the specifications to be dismissed
in favour of studying implementations (assuming you had access to, and
time to study, all browser implications). As far as the javascript
specification is concerned the implementations that assert that they
comply with ECMA 262 actually have very few deviations from the
specification (and mostly insignificant ones) so knowing how a
javascript engine should be expected to behave is a very good guide to
99%+ of the actual behaviour of implementations, including the ones that
are unavailable for actual testing.
It seems that moving windows around by reference rather
than ID would be a speed improvement and probably slightly
less code,
As in general whenever you can pass, access or store a string value you
can also pass, access or store an object reference the use of string
references just adds a layer of needless complexity and a runtime
overhead.
so you can rest-assured my application will reflect this
when I next have a play with it.
OK, but doesn't that make you suspect "all you need to know to ..."
I don't respond to authority though. Never have, never will
Not even to listen?
(unless you're paying me).
In the event of needing more javascript programmers I would be looking
for someone with more practical experience (though it would not be me
paying anyway, just interviewing).
Richard.
.
- Follow-Ups:
- Re: Clear all optgroups and options from a select list
- From: darwinist
- Re: Clear all optgroups and options from a select list
- References:
- Clear all optgroups and options from a select list
- From: Brian D
- Re: Clear all optgroups and options from a select list
- From: darwinist
- Re: Clear all optgroups and options from a select list
- From: RobG
- Re: Clear all optgroups and options from a select list
- From: darwinist
- Re: Clear all optgroups and options from a select list
- From: RobG
- Re: Clear all optgroups and options from a select list
- From: darwinist
- Re: Clear all optgroups and options from a select list
- From: Richard Cornford
- Re: Clear all optgroups and options from a select list
- From: darwinist
- Clear all optgroups and options from a select list
- Prev by Date: Re: Hello World with YUI Library - asyncRequest
- Next by Date: Re: How a delete a object from DOM ?
- Previous by thread: Re: Clear all optgroups and options from a select list
- Next by thread: Re: Clear all optgroups and options from a select list
- Index(es):
Relevant Pages
|