
Signature
Martin Honnen
http://JavaScript.FAQTs.com/
> document.getElementById is not a JavaScript function nor a JScript
> function, it is a method of a DOM object implemented in browsers like IE
> 5 and later, Netscape 6 and later. So simply continue to use
> document.getElementById, IE exposes that to your JScript as well as
> VBScript.
The problem is, I need to run the script in a WebBrowser control from
within a Managed .NET Compact Framework application. Using JavaScript
is not allowed in that environment (or at least not the script I try
to run), so I want to try if JScript *is*. Ultimately, what I want to
accomplish is to display text that was previously hidden when a link
(or button) was pressed.
Daan
Martin Honnen - 31 Oct 2007 15:04 GMT
> The problem is, I need to run the script in a WebBrowser control from
> within a Managed .NET Compact Framework application. Using JavaScript
> is not allowed in that environment (or at least not the script I try
> to run), so I want to try if JScript *is*. Ultimately, what I want to
> accomplish is to display text that was previously hidden when a link
> (or button) was pressed.
I have no idea which DOM the WebBrowser control in the .NET Compact
Framework supports. You could try whether
document.all["elementId"]
works if
documen.getElementById("elementId")
does not.
As said, it is not a question of JScript versus JavaScript, it is a
question of the DOM implementation the browser (control) offers.

Signature
Martin Honnen
http://JavaScript.FAQTs.com/
Thomas 'PointedEars' Lahn - 31 Oct 2007 16:48 GMT
>> document.getElementById is not a JavaScript function nor a JScript
>> function, it is a method of a DOM object implemented in browsers like IE
[quoted text clipped - 4 lines]
> The problem is, I need to run the script in a WebBrowser control from
> within a Managed .NET Compact Framework application.
I don't know your environment. However, from the ".NET" part in the name I
would conclude that it is pretty unlikely that the supported ECMAScript
implementation was (Netscape/Mozilla.org) JavaScript, as it is *Microsoft*
".NET".
> Using JavaScript is not allowed in that environment (or at least no
> the script I try to run),
It would help a great deal for an analysis if you not only named that script
but posted the offending lines of source code.
> so I want to try if JScript *is*.
ISTM you have several misconception here, of which one Martin already
clarified. JavaScript and JScript are different programming languages, but
they are both ECMAScript implementations (which is what makes them look
similar). However, I have yet to see an execution environment that supports
both implementations. Usually you find JScript supported by Microsoft
applications and JavaScript by Netscape/Mozilla.org applications.
> Ultimately, what I want to accomplish is to display text that was
> previously hidden when a link (or button) was pressed.
How, exactly?
PointedEars

Signature
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
SAM - 31 Oct 2007 23:31 GMT
Daan a écrit :
> The problem is, I need to run the script in a WebBrowser control from
> within a Managed .NET Compact Framework application. Using JavaScript
> is not allowed in that environment
Probably not with IE but ...
CSS :
=====
.truc { display: block; position: relative;
width: 70px; border: 3px outset;
text-align: center; text-decoration: none;
}
.truc:hover { color: orange; border-style: inset }
.truc span {
display: none;
position: absolute;
top: 10px; left: 50px;
padding: 6px; width: 60px;
border: 1px solid; z-index: +1;
}
.truc:hover span, .truc:focus span { display: block }
HTML :
======
<a class="truc">click me
<span>something here hidden/shown </span> </a>

Signature
sm