Question: I saw this code and I'm scratching my head trying to decide how it works.

```
<SCRIPT LANGUAGE=javascript> 

     function SpeechMikeControl::SPMEventButton(lDeviceID, EventId) {
        alert("lDeviceID=" + lDeviceID + ", EventId=" + EventId);
     }

</SCRIPT>

```

double colon? This is from using a philips speech mike from a web page.

Any idea what this double colon means? It seems like a syntax error to me but it works! (at least in IE).

Answer: 
I've been able to find an obscure reference in some scanned manual from [Microsoft Office Infopath 2003](http://books.google.com/books?id=ZY9h8FjCkewC&pg=PA25&lpg=PA25&dq=%2bjscript%20double%20colon&source=bl&ots=AWq1RzBI8E&sig=6lkIuj5mwa8sEsMwa72yFFeksyo&hl=es&ei=YWytTfvrEsWZ8QOrptnyAQ&sa=X&oi=book_result&ct=result&resnum=1&sqi=2&ved=0CBcQ6AEwAA#v=onepage&q=%2bjscript%20double%20colon&f=false). It appears to be a `JScript` syntax:

> 
> a double colon is used as separator
>  between the script ID and the event
>  name
> 
> 
> 

My guess is that's not part (or no longer part) of Internet explorer's ECMAScript implementation but it belongs (or used to belong) to Microsoft Office's implementation.
This is an extension to the Javascript language implemented by Microsoft. It's purpose is to specify an event handler for a COM object referenced on the page. `SpeechMikeControl` is the globally-scoped name of the COM (and/or ActiveX) object:

* either with an `OBJECT` or some other element, which has an `id` property of `SpeechMikeControl`, or
* a global variable `SpeechMikeControl` declared somewhere previously in the Javascript

`SPMEventButton` is the name of the COM event which will be raised by the `SpeechMikeControl` object under who-knows-what circumstances. 

The double colon is an instruction to connect the function body as a handler to the control's event.