correct use of getValue. Use standard ddm element value instead

This commit is contained in:
Isaac Connor 2018-05-16 11:13:59 -04:00
parent 5df2fbfff2
commit 81c4542a94
1 changed files with 7 additions and 5 deletions

View File

@ -1,10 +1,12 @@
function updateLabel() {
var presetIndex = $('contentForm').preset.getValue();
var form = $('contentForm');
var preset_ddm = form.elements['preset'];
var presetIndex = preset_ddm[preset_ddm.selectedIndex].value;
if ( labels[presetIndex] ) {
$('contentForm').newLabel.value = labels[presetIndex];
form.newLabel.value = labels[presetIndex];
} else {
$('contentForm').newLabel.value = "";
form.newLabel.value = '';
}
}
window.addEvent( 'domready', updateLabel );
window.addEvent('domready', updateLabel);