I'm having some problem with some selected / none function (I was not writing it, I had to fix it I'm trying to!) It currently looks like this:
rsfindmod.SelAll = function () {document.getElementById ("ListBox") Select all (); Document.getElementById ("ListBox") focus () .; }
This is being used on dynamically generated links, so there are no number of items in this listbox. It works most of the time, but randomly it chooses those people who appear on time. Scrolling the list or hitting the button normally works as expected.
My first (clear) idea was to change the function completely with this link from one of the following:
The trouble is that I can not find this work in any work Could! It gives me an error that
listbox.options is not defined
Any thoughts please? I am certainly not sure whether this is a fundamental task or something in this list.
According to the comments, while working with XUL, list by default select (all), so I expect that this list has made the content of boxes, this is a problem? It looks like this:
rsfindmod.onLoad = function () {var parElement = document.getElementById ("listbox"); Var prefservice = Components.classes ["@ mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); Var prefs = prefservice.getBranch ("extensions.rsfindmod."); // var i = 0; i & lt; window.arguments [0] .inn.thelinks.length; i + +) for each result {var newElement = document.createElement ("listitem") newElement.setAttribute (" ID ", (" list "+ i.toString ()); NewElement.setAttribute ("label", window.arguments [0] .inn.thelinks [i]); ParElement.appendChild (newElement); } ..... Here some more code to highlight the specific link, but junking that produces similar issues, and it is very irrelevant here. .....
Comments
Post a Comment