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

Feedback on: irt.org FAQ Knowledge Base

irt.org | About | Feedback | 3171 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base

Sent by
Kim Hubbard on September 19, 2001 at 16:54:41:

Worth:
Very worth reading

Length:
Just right

Technical:
Just right

Comments:
If anyone wants addtional code, I expanded on Q916 (sorting a select list dynamically) to change the order dynamically:

(add this function)
function moveOption(what, where) {
// Note that who = option what = list where = +/-1
// -1 moves up the list, +1 moves down the list.
var who = what.selectedIndex;
var currValue = what[who].value;
var currText = what[who].text;

if(((who + where) <= what.length) && ((who + where) >= 0))
{
what[who].value = what[(who + where)].value;
what[who].text = what[(who + where)].text;
what[(who + where)].value = currValue;
what[(who + where)].text = currText;

what.selectedIndex = who + where;
}
}

(add this button)
<P>
<input type="button" value=" Move Up ^ " onClick="if (document.images) moveOption(this.form.select,-1)">




Other feedback on 'irt.org FAQ Knowledge Base' - 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.