You are here: irt.org | About | Feedback | 2188 [ previous next ]
Feedback on:
Dropdown Menus #2
Sent by
Mike Jones on December 29, 2000 at 17:11:34:
Worth:
Very worth reading
Comments:
Hey,
I found the hints for dynamic dropdown menus very helpful and have been using them often. I found something out, though.
Instead of refreshing the screen on Netscape browsers with history.go(0), you can just do a javascript click on the new option (or any option) in the select box. This is much less visually intrusive on the client since it doesn't produce the flicker.
function addOption(object) {
var defaultSelected = true;
var selected = true;
var optionName = new Option(object.currentText.value, object.currentValue.value, defaultSelected, selected)
var length = object.selectName.length;
object.selectName.options[length] = optionName;
/*The new bit*/
object.selectName.options[length-1].selected = true; \\length has been incremented
/*End new bit*/
}
I've only tried this on Netscape 4.6 thus far. Hope this is helpful, I just thought it was slick and thought you might too.
Thanks again,
Mike
Other feedback on 'Dropdown Menus #2' - show all