I'll try it soon.
> Y.H. Duan,
> I spliced a few frames of code here.
> NOTE:
> the spans in the table
> the events are from an DAX ActiveForme - not shown
> the last line in ShowEvent
> <snip comment="this code will crash">
> <style>span.Black= { font-size: 10pt; font-weight: bold; font-family:
> sans-serif; color: Black }
> </style>
> <style>span.Red= { font-size: 10pt; font-weight: bold; font-family:
> sans-serif; color: Red }
> </style>
> <script language=VBScript>
> Sub imageX_OnImgSrcChange()
> Call parent.ShowEvent( "imgImgSrc", "OnImgSrcChange" )
> End Sub
> Sub imageX_OnSmallImgBgSrcChange()
> Call ShowEvent( "imgSmallImgBgSrc", "OnSmallImgBgSrcChange" )
> End Sub
> Sub imageX_OnLargeImgBgSrcChange()
> Call ShowEvent( "imgLargeImgBgSrc", "OnLargeImgBgSrcChange" )
> End Sub
> Sub imageX_OnSmallImgSave()
> Call ShowEvent( "imgSmallImgSave", "OnSmallImgSave" )
> End Sub
> Sub imageX_OnLargeImgSave()
> Call ShowEvent( "imgLargeImgSave", "OnLargeImgSave" )
> End Sub
> Sub imageX_OnImgZoomChange()
> Call ShowEvent( "imgImgZoom", "OnImgZoomChange" )
> End Sub
> Dim xControl 'variable for ActiveForm object
> 'GENERIC ROUTINES
> 'Function NotLoaded 'check if the control has loaded, give the user
> options
> 'Sub Window_OnUnload()
> 'CUSTOM ROUTINES
> 'Sub ClearArrows() 'reset all the arrows
> 'Sub ResetBlack()
> 'Sub ShowEvent( ByVal sIMG, ByVal sSPAN )
> Function NotLoaded()
> 'CONTROLLED CRASH
> On Error Resume Next
> Set xControl = self.right.imageX
> xControl.SlidersZoomEnabled = xControl.SlidersZoomEnabled
> '/CONTROLLED CRASH
> If Err.Number = 0 Then
> NotLoaded = False
> Else
> top.document.location = "../security_settings.htm"
> NotLoaded = True
> End If
> End Function
> Sub ClearArrows()
> If NotLoaded then Exit Sub
> With self.left.document
> .imgImgSrc.Src = "../images/arrow_blue.gif"
> .imgSmallImgBgSrc.Src = "../images/arrow_blue.gif"
> .imgLargeImgBgSrc.Src = "../images/arrow_blue.gif"
> .imgSmallImgSave.Src = "../images/arrow_blue.gif"
> .imgLargeImgSave.Src = "../images/arrow_blue.gif"
> .imgImgZoom.Src = "../images/arrow_blue.gif"
> .imgImgColor.Src = "../images/arrow_blue.gif"
> .imgImgTransform.Src = "../images/arrow_blue.gif"
> .imgImgPosition.Src = "../images/arrow_blue.gif"
> .imgText.Src = "../images/arrow_blue.gif"
> End With
> End Sub
> Sub ResetBlack()
> Dim oAll : Set oAll = self.left.document.all
> Dim i
> For i = 0 To oAll.Length - 1
> If oAll.Item(i).tagName = "SPAN" Then
> If oAll.Item(i).className = "Red" Then oAll.Item(i).className = "Black"
> End If
> Next
> Set oAll = Nothing
> End Sub
> Sub ShowEvent( ByVal sIMG, ByVal sSPAN )
> Call parent.ClearArrows()
> Call parent.ResetBlack()
> self.left.document.all.item( sIMG ).Src = "../images/arrow_anim.gif"
> self.left.document.all.item( sSPAN ).className = "Red"
> End Sub
> Sub Window_OnUnload()
> Set xControl = nothing
> End Sub
> </script>
> </head>
> <body background="../images/MARBLE.GIF">
> <table border="0" cellpadding="0" height="100%">
> <tr>
> <td valign="top" colspan="2" height="20"><font face="Arial"
> size="2"><b><i><img border="0" src="../images/icon_objects.gif"
> align="absmiddle" width="15" height="17">
> image<font color="#FF0000">x</font></i></b>
> ActiveForm Developer<br>
> <br>
> </font><b><font face="Arial" size="3" color="#0000FF"><img border="0"
> src="../images/icon_method.gif" width="16" height="16">
> Events - demo<br>?
> </font></b></td>
> </tr>
> <tr>
> <td valign="top" height="30"><img border="0"
> src="../images/arrow_black.gif" name="imgImgSrc" vspace="2" hspace="2"
> width="8" height="10" ></td>
> <td nowrap valign="top"><span id="OnImgSrcChange"
> class="Black">OnImgSrcChange</span></td>
> </tr>
> <tr>
> <td valign="top" height="30"><img border="0"
> src="../images/arrow_black.gif" name="imgImgZoom" vspace="2" hspace="2"
> width="8" height="10" ></td>
> <td nowrap valign="top"><span id="OnImgZoomChange"
> class="Black">OnImgZoomChange</span></td>
> </tr>
> <tr>
> <td valign="top" height="30"><img border="0"
> src="../images/arrow_black.gif" name="imgImgColor" vspace="2" hspace="2"
> width="8" height="10" ></td>
> <td nowrap valign="top"><span id="OnImgColorChange"
> class="Black">OnImgColorChange</span></td>
> </tr>
> <tr>
> <td valign="top" height="30"><img border="0"
> src="../images/arrow_black.gif" name="imgImgTransform" vspace="2" hspace="2"
> width="8" height="10" ></td>
> <td nowrap valign="top"><span id="OnImgTransformChange"
> class="Black">OnImgTransformChange</span></td>
> </tr>
> <tr>
> <td valign="top" height="30"><img border="0"
> src="../images/arrow_black.gif" name="imgImgPosition" vspace="2" hspace="2"
> width="8" height="10" ></td>
> <td nowrap valign="top"><span id="OnImgPositionChange"
> class="Black">OnImgPositionChange</span></td>
> </tr>
> </table>
> </snip>
> --
> Nic Roche
> Net Extra
> www.extra.net.au
> > Yes, I'd like to see the code. The color change depends on the option of a
> > <SELEST> tag, so it also need a VBSript or JavaScript.
> > Thank you very much.
> > Y.H. Duan
> > > Y.H. Duan,
> > > Initialise 2 style classes with the font properties you want.
> > > Set the text in spans. Assign the class to start with in the span
> > > attributes.
> > > On an event, name a new className to the span.
> > > This should get you there.
> > > If you need working code I will see what I can do.
> > > --
> > > Nic Roche
> > > Net Extra
> > > www.extra.net.au
> > > > Thanks, Nic. I can set up the "enabled" "disabled", but I don't know
> how
> > > to
> > > > change the label color like "Weekly($)" and "Biweekly($)". If I
> disable
> > > > these fields and gray the labels before them, it will be easier for
> users
> > > to
> > > > us. Any ideas?
> > > > Y.H. Duan
> > > > > Y.H. Duan,
> > > > > Using DHTML
> > > > > in HTML:
> > > > > Biweekly($):<input type="text" disabled id="Biweekly"
> name="Biweekly"
> > > > > size="7" maxlength="9">
> > > > > in Script:
> > > > > Biweekly.Disabled=True
> > > > > <snip src="MSDN code sample">
> > > > > <STYLE ID=oStyle>
> > > > > .styletest{background-color: black; color: white;}
> > > > > .styletest2{background-color: black; color: red;}
> > > > > </STYLE>
> > > > > <SCRIPT>
> > > > > function fnSwitch(){
> > > > > if(oParagraph.enablement == "enabled"){
> > > > > // Use an arbitrary attribute to track the status
> > > > > oParagraph.enablement = "disabled";
> > > > > oButton.value = "Set disabled to false";
> > > > > oStyle.disabled = true;
> > > > > oDisableMe.disabled = true;
> > > > > }
> > > > > else{
> > > > > oButton.value = "Set disabled to true";
> > > > > oParagraph.enablement = "enabled";
> > > > > oStyle.disabled = false;
> > > > > oDisableMe.disabled = false;
> > > > > }
> > > > > }
> > > > > </SCRIPT>
> > > > > :
> > > > > <P enablement = "enabled" ID = oParagraph CLASS = "styletest">
> > > > > A paragraph of text.
> > > > > <INPUT TYPE = button ID = oDisableMe
> > > > > CLASS = "styletest"
> > > > > VALUE = "Demonstration Button"
> > > > > onclick = "alert('Demonstration button')">
> > > > > </P>
> > > > > <INPUT TYPE=button
> > > > > ID=oButton
> > > > > VALUE="Set disabled to true"
> > > > > onclick="fnSwitch()">
> > > > > </snip>
> > > > > --
> > > > > Nic Roche
> > > > > Net Extra
> > > > > www.extra.net.au
> > > > > > Can anybody tell me how to dynamically change the string color in
> HTML
> > > > > > using VBScript or JavaScript?
> > > > > > For example:
> > > > > > Hourly($): <input type="text" name="Hourly" size="7"
> maxlength="6">
> > > > > > Weekly($):<input type="text" name="Weekly" size="7"
> maxlength="9">
> > > > > > Biweekly($):<input type="text" name="Biweekly" size="7"
> > > maxlength="9">
> > > > > > in above HTML code, if "Hourly" is enabled, I want "Weekly" and
> > > > > > "Biweekly" to be disabled and the color of Weekly($) and
> Biweekly($)
> > > be
> > > > > > changed to gray in the same time.
> > > > > > Any help is appreciated.
> > > > > > Y.H. Duan