To build buttons with a dynamic effect is very easy. Here's an example that produces a control panel of buttons with special visual effects. This example uses ASP to have the page call itself and produce an output in the same window without the use of frames.
Begin with your standard opening headers for an ASP page
'------------------------------------------------------------------ 'This page calls itself so get file name '------------------------------------------------------------------
'------------------------------------------------------------------ 'Set up your normal html page '------------------------------------------------------------------
Style parameters will be included as an internal format Alternatively, this could be an external file.
Three style classes are required: 1. for the mouse over event 2. for the mouse out event 3. for the mouse click event
Each class specifies the appearance. The shadow filter can only be appliead to a tag which can define an area. In this example a table data cell satisfies that criteria.
.cpout { font-weight: bold; font-family : "Times New Roman"; color : Black}
.cpclick { font-weight: bold; font-family : "Times New Roman"; color:blue}
TD { font-weight: bold; font-family : "Times New Roman"; color : Black; text-align : center;}
--></style>
To produce the dynamic effect, the following client-side scripts are used for each of the mouse events.
<Script Language="VBScript"><!--
Sub document_OnMouseOver() ThisTag = Window.Event.SrcElement.tagname If ThisTag = "TD" then subscript = Window.Event.SrcElement.sourceindex document.all(subscript).classname = "cpover" end if end sub
Sub document_OnMouseOut() ThisTag = Window.Event.SrcElement.tagname If ThisTag = "TD" then subscript = Window.Event.SrcElement.sourceindex document.all(subscript).classname = "cpout" end if end sub
Sub document_OnClick() ThisTag = Window.Event.SrcElement.tagname If ThisTag = "TD" then subscript = Window.Event.SrcElement.sourceindex document.all(subscript).classname = "cpclick" end if end sub
--></Script>
The remainder of the page creates a table for the content and connecting links.