Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: Dropdown Menus #2

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


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.