It may be - using the style property of the listbox - thru which you can apply the rich set of CSS facilities. You would clearly need JavaScript and a good DOM implementation - typically IE 5 upwards fully supports the style property, but NS4 is fairly poor.
But to start, you need to get the DTC to generate an 'onmouseover="something"' with the listbox. To do this you must 'Advise' the listbox to see the mouseover and mouseout events:
And you may need to implement an empty server-side subroutine called 'dummy()'.
The generated listbox HTML will now include the onmouseover and onmouseout event - and these will both call some strange system function. So how to call YOUR Client-Side code? Well, you can trap it in the onbeforeserverevent javascript function...
1. ensure you have a PageObjectDTC for the page
2. find the Script Outline view in VI (it could be a tab of the toolbox panel on the left)
3. find the 'thisPage' twig on the Client Object branch (the top branch).
4. double-click the onbeforeserverevent - and hey-presto a bundle of JavaScript is added to your page. It will need adjusting though....
The 'onbeforeserverevent' is raised by ALL DTC's before they do a server-round-trip. The system passes 2 parameters to the function - but you have to add these yourself. The parameters are both strings, and say the name of the object (the listbox, for example) and the event ('onmouseover') Adjust the VI created code as follows:
function thisPage_onbeforeserverevent( i_strObject, i_strEvent
) {
if (i_strObject == 'lstMyListbox')
{
if (i_strEvent == 'onmouseover')
{
//do the listbox sytle change here
document.thisForm.lstMyList.style....
// and cancel the server-round trip
thisPage.cancelEvent = true;
}
else if (i_strEvent == 'onmouseout')
//etc...
}
//-->
</SCRIPT>
Just add the stuff in bold above. You will have to figure out which style properties you need to adjust.
NOTE: VI will NOT pop-up the listbox name when typing the
document.thisForm.
bit (you MUST include 'document.' if this is to be used by Netscape). However, the listbox will exist when this code runs - so it will work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.