JavaScript DHTML/SmartClient/Tooltip
Change tooltip for ComboBox
<source lang="html4strict">
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="silver"> <SCRIPT> isc.DynamicForm.create({
ID: "severityForm", width: 200, itemHoverWidth: 200, fields: [ {name: "severityLevel", title: "Severity Level", type: "select", valueMap: ["Severity 1", "Severity 2", "Severity 3"], defaultValue: "Severity 2", itemHoverHTML : function () { // help text is keyed by the value of the select if (this.isDisabled()) { return "Status can only be changed by the bug"s owner"; } return this.hoverText[this.getValue()]; }, hoverText: {"Severity 1": "Severity 1
Critical problem. System is unavailable in production or " +"is corrupting data, and the error severely impacts the user"s operations.", "Severity 2": "Severity 2<p> Major problem. An important function of the system " +"is not available in production, and the user"s operations are restricted.", "Severity 3": "Severity 3<p> Minor problem. Inability to use a function of the " +"system occurs, but it does not seriously affect the user"s operations." } } ] }); isc.Button.create({ top: 40, width: 150, title: "Enable/disable field", click: function () { var item = severityForm.getItem("severityLevel"); item.setDisabled(!item.isDisabled()); } }); </SCRIPT> </BODY> </HTML> </source>