FW: [thelist] [SOLVED] How to prevent FLASHING in a ComboBox

Sheriff sheriff at drivestream.com
Tue Aug 30 12:24:07 CDT 2005



> I can prevent it using <select onmousedown="this.swapNode(this)"> -
what a
> hack!


Excellent Lee!! I followed your suggestion and BINGO! It just works
fine.

The app however is cross-browser (but for only W3C compatible browsers).
But you know there is always an other way for other W3C browsers:
this.parentNode.replaceChild(this, this);

[code]
  if(e.target && e.target.tagName.toLowerCase()=="select"){
    if(is_ie && e.srcElement.swapNode)
      e.srcElement.swapNode(e.srcElement);
    else if(e.target && e.target.parentNode.replaceChild){
      e.target.parentNode.replaceChild(e.target, e.target);
    }
  } 
[/code]

Above is the working code snippet! (where e is from e=e?e:window.event;)

Thanks a lot for helping out with the hack in my desperate situation..
Now I can move on to other priorities and return back home late, hmm...
hehe ;)

Thanks to Hershel too..

Thanks again Lee - That hack saved my day!
Sheriff



More information about the thelist mailing list