Changes

Add Options to a Combo Box Using JavaScript

60 bytes added, 18:51, 31 July 2009
no edit summary
You can use a JavaScript function to modify the options available in a pull-down box on the page.
The following example adds a new blank selection at the top of the ''starthour'' field at '''Level 2'''for new records:
<pre>
function changeStartHour()
{
if (document.forms[0].eventid.value==0)
try
{
document.forms[0].starthour.add(new Option("", "", true, true), 0)
}
}
}
changeStartHour();
0
edits