Sort problem

Tuesday, November 19, 2013

Hi, I have 2 listboxes (Items can moves between them) and i need to display the text description/title for each item when mouse over. How do i sort the description/title according to thier item after the item moved.

I have set the moved item located at the bottom of the list first. Then i will sort them after that. However i do not know how to sort the mouse over description/title according to their items.
Remind : Description/title must tie to its item. 

Please help. Thanks.

function JWP_UIWT_swap(inSrc, inAll) {
    if (inSrc == JWP_UIWT_LEFT) {
      oSrc = document.getElementById("JWP_UIWT_swapper1_leftSelect");
      oDest = document.getElementById("JWP_UIWT_swapper1_rightSelect");
    } else {
      oSrc = document.getElementById("JWP_UIWT_swapper1_rightSelect");
      oDest = document.getElementById("JWP_UIWT_swapper1_leftSelect");
    for (i = 0; i < oSrc.options.length; i++) {
      oOpt = oSrc.options[i];
      if (oOpt.selected || inAll) {
      oNew = new Option(oOpt.text , oOpt.value);
      oNew.title = oOpt.title;
      oDest.options[oDest.options.length] = oNew;

   function sortLeftlist() {
var lb = document.getElementById('JWP_UIWT_swapper1_leftSelect');
arrTexts = new Array();
arrTitle = new Array();

for(i=0; i<lb.length; i++)  {
 arrTexts[i] = lb.options[i].text;
 arrTitle[i] = lb.options[i].title;


for(i=0; i<lb.length; i++)  {
 lb.options[i].text = arrTexts[i];
 lb.options[i].value = arrTexts[i];
 lb.options[i].title = arrTitle[i];

You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit


Post a Comment

Note: Only a member of this blog may post a comment.

Copyright © 2010 Web Design | Free Blogger Templates by Splashy Templates | Layout by Atomic Website Templates

Vida de bombeiro Recipes Informatica Humor Jokes Mensagens Curiosity Saude Video Games Animals Diario das Mensagens Eletronica Rei Jesus News Noticias da TV Artesanato Esportes Noticias Atuais Games Pets Career Religion Recreation Business Education Autos Academics Style Television Programming Motosport Humor News The Games Home Downs World News Internet Design Entertaimment Celebrities 1001 Games Doctor Pets Net Downs World Enter Jesus Mensagensr Android Rub Letras Dialogue cosmetics Genexus lasofia thebushrajr wingshock tripedes gorduravegetal dainfamia dejavu-transpersonal jsbenfica republicadasbadanas ruiherbon iranianforaryans eaystcheyl fotosdanadir Só Humor Curiosity Gifs Medical Female American Health Madeira Designer PPS Divertidas Estate Travel Estate Writing Computer Matilde Ocultos Matilde futebolcomnoticias girassol lettheworldturn topdigitalnet Bem amado enjohnny produceideas foodasticos cronicasdoimaginario downloadsdegraca compactandoletras newcuriosidades blogdoarmario arrozinhoii