Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: 16 May 2006 08:12:09 -0700,    group: microsoft.public.inetsdk.programming.scripting.jscript        back       


default event handlers   
Remember when trident was first introduced? There was a naming
convention for jscript functions in MSIE that attached the function to
an element as an event handler. Something like
<span id="stan">scan</span>
<script language="jscript">
fuction stan_onmouseenter(){
   document.getElementById("stan").innerText = "sean";
}
</script>
I don't imagine this feature has gone away, but the underscore isn't
working and I've forgotten what the convention was. Nor can I find any
documentation for it.
Does anyone remember this?
Thanks!
Ion
date: 16 May 2006 08:12:09 -0700   author:   ion

Re: default event handlers   
ion  wrote:
> Remember when trident was first introduced? There was a naming
> convention for jscript functions in MSIE that attached the function to
> an element as an event handler. Something like
> <span id="stan">scan</span>
> <script language="jscript">
> fuction stan_onmouseenter(){
>   document.getElementById("stan").innerText = "sean";
> }
> </script>

This naming convention works for VBScript, but not for JScript. As far 
as I can tell, it never worked for JScript.

You have a number of options in JavaScript

<script for="stan" event="onmouseenter">
    doSomething();
</script>

// or

stan.onmouseenter = function() {doSomething();};

// or

stan.attachEvent("onmouseenter", function() {doSomething();});

-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Tue, 16 May 2006 11:42:42 -0400   author:   Igor Tandetnik

Re: default event handlers   
Igor,
   Thanks! I'm trying to work around another issue with this. I'll try
the vbscript. (and I meant to write 'function'.)
Ion
date: 16 May 2006 10:55:58 -0700   author:   ion

Re: default event handlers   
ion wrote:
> Igor,
>    Thanks! I'm trying to work around another issue with this. I'll try
> the vbscript. (and I meant to write 'function'.)
> Ion
In vbscript, it needs to be a sub.
-- 
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
date: Tue, 16 May 2006 14:53:19 -0400   author:   Bob Barrows [MVP] com

Re: default event handlers   
Igor Tandetnik wrote:
> ion  wrote:
>> Remember when trident was first introduced? There was a naming
>> convention for jscript functions in MSIE that attached the function
>> to an element as an event handler. Something like
>> <span id="stan">scan</span>
>> <script language="jscript">
>> fuction stan_onmouseenter(){
>>   document.getElementById("stan").innerText = "sean";
>> }
>> </script>
>
> This naming convention works for VBScript, but not for JScript. As far
> as I can tell, it never worked for JScript.
>


Actual JScript (in IE and WSH as well) supports Object::Eventname comparable 
to Object_Eventname of VBScript.

Scripting Events (Scripting Clinic)
<http://msdn.microsoft.com/library/en-us/dnclinic/html/scripting04092001.asp?frame=true>

> You have a number of options in JavaScript
>
> <script for="stan" event="onmouseenter">
>    doSomething();
> </script>
>
> // or
>
> stan.onmouseenter = function() {doSomething();};
>
> // or
>
> stan.attachEvent("onmouseenter", function() {doSomething();});

-- 
Michael Harris
Microsoft MVP Scripting
date: Tue, 16 May 2006 16:35:20 -0700   author:   Michael Harris \(MVP\) mikhar at mvps dot org

Re: default event handlers   
May be you can still do this.

function stan::onmouseenter(){
   document.getElementById("stan").innerText = "sean";
}


***************************

Drawback to using this style on your page is,
that "they" think you are smart, and from then on
you can forget about deals and trading.

Or peer answers.

***************************

They will suddenly all want money,
even for software that does not work
as specified in the first place.

Os vendors no exception

=======================

So if you stick out, or your site does not look
as pathetic as theirs does, the Motor Vehicle,
TV, John Stewart, Cspan mass will "scalp" you.




"ion"  wrote in message
news:1147792329.913368.42050@g10g2000cwb.googlegroups.com...
> Remember when trident was first introduced? There was a naming
> convention for jscript functions in MSIE that attached the function to
> an element as an event handler. Something like
> <span id="stan">scan</span>
> <script language="jscript">
> fuction stan_onmouseenter(){
>    document.getElementById("stan").innerText = "sean";
> }
> </script>
> I don't imagine this feature has gone away, but the underscore isn't
> working and I've forgotten what the convention was. Nor can I find any
> documentation for it.
> Does anyone remember this?
> Thanks!
> Ion
>
date: Fri, 19 May 2006 02:33:28 -0400   author:   asdf

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us