Click to return to the Component Development home page    
Web Workshop  |  Component Development
<HR SIZE=5 NOSHADE>
<CENTER>
<BLOCKQUOTE>
    <SCRIPT LANGUAGE="JavaScript" FOR="StopLite1" EVENT="Click()">
<!--
window.alert("StopLite clicked. Try other button!")

//-->
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" FOR="StopLite1" EVENT="Caution()">
<!--
IeLabel1.Caption = "Caution!"
IeLabel1.FontSize = 20
IeLabel1.FontBold = -1
IeLabel1.FontItalic = 0
IeLabel1.FontUnderline = 0

//-->
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" FOR="StopLite1" EVENT="Go()">
<!--
IeLabel1.Caption = "Go! Go! Go!"
IeLabel1.FontBold = 0
IeLabel1.FontItalic = 0
IeLabel1.FontSize = 12
IeLabel1.FontUnderline = 0

//-->
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" FOR="StopLite1" EVENT="Off()">
<!--
IeLabel1.Caption = "Warning! StopLite out of order!"
IeLabel1.FontSize = 20
IeLabel1.FontBold = -1
IeLabel1.FontItalic = 0
IeLabel1.FontUnderline = 0

//-->
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" FOR="StopLite1" EVENT="Testing()">
<!--
IeLabel1.Caption = "Warning! StopLite being tested!"
IeLabel1.FontSize = 20
IeLabel1.FontBold = -1
IeLabel1.FontItalic = 0
IeLabel1.FontUnderline = 0

//-->
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript" FOR="StopLite1" EVENT="Stop()">
<!--
IeLabel1.Caption = "STOP!!!!!!"
IeLabel1.FontSize = 40
IeLabel1.FontBold = -1
IeLabel1.FontItalic = -1
IeLabel1.FontUnderline = -1

//-->
    </SCRIPT>
    <OBJECT ID="StopLite1" WIDTH=100 HEIGHT=115
     CLASSID="CLSID:20048BB3-DB68-11CF-9CAF-00AA006CB425"
     CODEBASE="STOPLITE.OCX">
        <PARAM NAME="_Version" VALUE="65536">
        <PARAM NAME="_ExtentX" VALUE="2646">
        <PARAM NAME="_ExtentY" VALUE="3034">
        <PARAM NAME="_StockProps" VALUE="9">
    <A HREF="/ie/"> 
       <IMG SRC="/workshop/components/activex/stoplite/STOP.GIF" WIDTH=100 HEIGHT=51 BORDER=0
ALT="Image of StopLite Control.">
    </A>
    <P><I>
Again, your browser hasn't been activated with ActiveX. (See above for more 
information.) Although you can see the buttons and a bitmap of the 
control, you'll get scripting errors if you click on the buttons. If you had 
ActiveX, clicking on the buttons would change the StopLite.
<P>
Why not download <A HREF="/ie/">Microsoft Internet Explorer 3.0</A> 
and experience what you've been missing? (If you have IE3, turn on ActiveX 
controls!)
</I>
    </OBJECT>
    <FORM>
        <INPUT LANGUAGE="JavaScript" TYPE=BUTTON VALUE="Next Light" ONCLICK="StopLite1.Next()"
         NAME="ButtonNext">
        <INPUT LANGUAGE="JavaScript" TYPE=BUTTON VALUE="Red" ONCLICK="StopLite1.Color = 1"
         NAME="ButtonRed">
        <INPUT LANGUAGE="JavaScript" TYPE=BUTTON VALUE="Green" ONCLICK="StopLite1.Color = 2"
         NAME="ButtonGreen">
        <INPUT LANGUAGE="JavaScript" TYPE=BUTTON VALUE="Yellow" ONCLICK="StopLite1.Color = 3"
         NAME="ButtonYellow">
        <INPUT LANGUAGE="JavaScript" TYPE=BUTTON VALUE="Off" ONCLICK="StopLite1.Color = 0"
         NAME="ButtonOff">
        <INPUT LANGUAGE="JavaScript" TYPE=BUTTON VALUE="Test" ONCLICK="StopLite1.Color = 4"
         NAME="ButtonTest">
    </FORM>
<p>
    <OBJECT ID="IeLabel1" WIDTH=500 HEIGHT=70
     CLASSID="CLSID:99B42120-6EC7-11CF-A6C7-00AA00A47DD2">
        <PARAM NAME="_ExtentX" VALUE="2646">
        <PARAM NAME="_ExtentY" VALUE="1323">
        <PARAM NAME="Caption" VALUE="Welcome to PaulJo's JavaScript StopLite page!">
        <PARAM NAME="Angle" VALUE="0">
        <PARAM NAME="Alignment" VALUE="4">
        <PARAM NAME="Mode" VALUE="1">
        <PARAM NAME="FillStyle" VALUE="0">
        <PARAM NAME="FillStyle" VALUE="0">
        <PARAM NAME="ForeColor" VALUE="#000000">
        <PARAM NAME="BackColor" VALUE="#C0C0C0">
        <PARAM NAME="FontName" VALUE="Arial">
        <PARAM NAME="FontSize" VALUE="12">
        <PARAM NAME="FontItalic" VALUE="0">
        <PARAM NAME="FontBold" VALUE="0">
        <PARAM NAME="FontUnderline" VALUE="0">
        <PARAM NAME="FontStrikeout" VALUE="0">
        <PARAM NAME="TopPoints" VALUE="0">
        <PARAM NAME="BotPoints" VALUE="0">

<I>
If your browser was ActiveX-enabled, you'd have an ActiveX text label control here.
It would change as the StopLite changed.
<P>
Either enable ActiveX or download <A HREF="/ie/">Microsoft Internet Explorer 3.0</A> to 
experience what you've been missing.
</I>
    </OBJECT>
<p>
<p>
<p>
<p>
This page uses JavaScript to link the controls. Click the buttons and the StopLite and see what happens!
</BLOCKQUOTE>
</CENTER>
<HR SIZE=5 NOSHADE>


Back to topBack to top

Did you find this material useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.