From: Ry Nohryb on
On Apr 28, 2:18 pm, Jake Jarvis <pig_in_sh...(a)yahoo.com> wrote:
> On 28.04.2010 13:43, wrote Thomas 'PointedEars' Lahn:
>
>
>
>
>
> > Andrew Poulos wrote:
>
> >> On 28/04/2010 7:59 PM, John G Harris wrote:
> >>> On Wed, 28 Apr 2010 at 04:43:19, in comp.lang.javascript, Thomas
> >>> 'PointedEars' Lahn wrote:
> >>>> <http://PointedEars.de/es-matrix>
>
> >>> I had to rescue IE8 with Ctl|Alt|Del to get out of this page.
>
> > Sorry.  Are you sure you have let it be loaded completely?  It has become
> > quite large, so it may take some time.  Which version of IE 8 have you used?  
> > Have you perhaps accessed a previous revision of the Matrix where there were
> > no problems (then I could consider reverting to that)?  TIA.
>
> >>> What have you done ?
>
> > Nothing deliberately harmful to IE (8).
>
> >>> What is object.js ?
>
> > It is the base library.
>
> >> IE 8 on Vista warns that
>
> > Does it warn, does it error out, or does it break there?
>
> >> Not implemented
> >> object.js, line 308 character 7
>
> > Thank you.  Apparently there is a problem with
>
> > | if (typeof window != "undefined" && typeof window.onerror != "undefined")
> > | {
> > |   window.onerror = fHandler;
> >     ^
> > | }
>
> > that the feature test could not deal with.
>
> > I am using this as a fallback mechanism for exceptions in
> > jsx.setErrorHandler().  Since this method is called from several others, and
> > I do not have Windows Vista to test with, could someone possibly provide a
> > stack trace, or more insight as to why the test would be passed but the
> > assignment would not work, please?  TIA.
>
> It's also erroring with "Nicht implementiert" (~ "not implemented") in
> Windows XP SP 3, IE 8.0.6001.18702 here.
>
> I'll try to copy the stack trace:
>
> | JScript anonymous function
>
> object.js line 308
>
> | JScript anonymous function
>
> refers to debug.js, line 50 `setErrorHandler();`
>
> | JScript global code
>
> So it appears you can not assign undefined to window.onerror in ie8
>
> the following
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>     "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head>
>   <title>window.onerror test</title>
>   <script type="text/javascript">
>     function foo() {
>       window.onerror = undefined;
>     }
>   </script>
> </head>
> <body onload="foo();">
>   <p>assigning `undefined` to window.onerror</p>
> </body>
> </html>
>
> also fails here

I've seen that before. You can assign null, though.
--
Jorge.
From: Scott Sauyet on
Thomas 'PointedEars' Lahn wrote:
> Ciaran wrote:
>> So anyway, the answer is no?
>
> No, the answer is "depends".  Read again.

I'm curious as to this. The original question was

| Is it possible to trigger the hover state of an element using
| javascript?

I have always assumed that the answer was no, that this couldn't be
done. I've generally chosen to add or remove a class to simulate
this. Are you suggesting that there are circumstances where this can
be done? If so, could you elaborate?

Thanks,

--
Scott
From: Thomas 'PointedEars' Lahn on
Scott Sauyet wrote:

> Thomas 'PointedEars' Lahn wrote:
>> Ciaran wrote:
>>> So anyway, the answer is no?
>>
>> No, the answer is "depends". Read again.
>
> I'm curious as to this. The original question was
>
> | Is it possible to trigger the hover state of an element using
> | javascript?
>
> I have always assumed that the answer was no, that this couldn't be
> done. I've generally chosen to add or remove a class to simulate
> this.

AISB, this is the recommended, most compatible approach.

> Are you suggesting that there are circumstances where this can
> be done? If so, could you elaborate?

In W3C DOM Level 2+ Events-compliant implementations you can create and
dispatch events programmatically. If you create a `mouseover' event and
dispatch it to an element object, it should trigger whatever "hover state"
is supposed to mean of the corresponding element.

Cf. <https://developer.mozilla.org/en/DOM/document.createEvent>


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
From: JR on
On Apr 28, 7:27 am, Ry Nohryb <jo...(a)jorgechamorro.com> wrote:
> On Apr 28, 4:43 am, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
> wrote:
>
>
>
> > (...) There is no "javascript" (...)
>
> This is comp.lang.ecmascript ?


And Thomas' JSX [begins with the letter *J*] states for "ECMAScript
Support Matrix"? Why not "ESX"? Strange, very strange...

--
JR
From: Scott Sauyet on
Thomas 'PointedEars' Lahn wrote:
> Scott Sauyet wrote:

>> I'm curious as to this.  The original question was
>
>> | Is it possible to trigger the hover state of an element using
>> | javascript?
>> [ ... ]
>> Are you suggesting that there are circumstances where this can
>> be done?  If so, could you elaborate?
>
> In W3C DOM Level 2+ Events-compliant implementations you can create and
> dispatch events programmatically.  If you create a `mouseover' event and
> dispatch it to an element object, it should trigger whatever "hover state"
> is supposed to mean of the corresponding element.
>
> Cf. <https://developer.mozilla.org/en/DOM/document.createEvent>

Thank you. I had never really looked at that before. It's a shame
that this is not implemented universally.

-- Scott