fo******@yahoo.co.uk wrote:
Richard Cornford wrote: fo******@yahoo.co.uk wrote: Completely ignore the non-standard nature of the
noddy example below.
So long as the example actually relates to the problem.
I've had people commenting that they won't help unless the
example is w3 compliant and multi-browser, bit silly for
a "noddy example"
<snip>
I can't say I have seen many people complaining that they won't help
with IE only stuff. Unless you mean Thomas Lahn, but he is not very
rational so you can safely disregard his opinion. It is true that IE
only stuff gets less attention, but that is mostly because writing for
one known environment is so trivial compared to cross-browser work that
it isn't very interesting (so of little entertainment value).
However, you could try posting to microsoft.public.scripting.jscript,
where IE only questions are the natural subject of the group.
You shouldn't expect this desire to be achievable (and your
on-line reading should have warned you of the issue).
it did, noddy example again. The real example is all local
and accessed (for now) via http:/localhost/Temp/temp.html,
hence fine cross scripting wise. ...
<snip>
That is exactly the sort of detail that needs to be presented up front
(it would, after all, have saved me spending any time on the subject at
all).
I've got this working now with something like the below
myIFrame1.contentWindow.document.attachEvent('onmo usedown',
function(){FireFunc('frame1');})
Are you looking in the right place for the event object? The event will
belong to the IFRAME's global/window object not the containing page's.
But the attached function, and the function it is calling, do belong to
the containing page so unqualified - event - and - window.event - both
refer to properties of its global/window object. If you want to write IE
only code then:-
myIFrame1.contentWindow.event
- should refer to the event object in that iframe. (Though I would
recommend accessing IFAMEs and frames through the - frames - collection
as the results are cross-browser (obviously works with IE as well); it
will require less reworking when IE's market share drops to the point
where even the most intransigent commercial sites realise they need to
accommodate other browsers.)
Richard.