ciao a tutti ho un problema (di nuovo ;)) con il javascript. In pratica ho uno script che crea varie slider. Il problema è che le carica tutte ma sono la prima funziona le altre non puoi modificare il valore.
Codice:
var iwood = new valueInput('textfield_wood', [0, <?=floor($this->Player_Model->now_town->wood)?>]);
    var swood = new Slider('sliderthumb_wood', {'from':iwood,'dir' : 'ltr'});
    UIManager.connect(swood,iwood);
    Event.addListener('slider_wood_min', 'click', function(ev){swood.setValue(swood.range[0]); Event.stopEvent(ev);});
    Event.addListener('slider_wood_max', 'click', function(ev){swood.setValue(swood.range[1]); Event.stopEvent(ev);});
    transporterCount.registerInput(swood);
    var iwine = new valueInput('textfield_wine', [0, <?=floor($this->Player_Model->now_town->wine)?>]);
    var swine = new Slider('sliderthumb_wine', {'from':iwine,'dir' : 'ltr'});
    UIManager.connect(swine,iwine);
    Event.addListener('slider_wine_min', 'click', function(ev){swine.setValue(swine.range[0]); Event.stopEvent(ev);});
    Event.addListener('slider_wine_max', 'click', function(ev){swine.setValue(swine.range[1]); Event.stopEvent(ev);});
    transporterCount.registerInput(swine);
    var imarble = new valueInput('textfield_marble', [0, <?=floor($this->Player_Model->now_town->marble)?>]);
    var smarble = new Slider('sliderthumb_marble', {'from':imarble,'dir' : 'ltr'});
    UIManager.connect(smarble,imarble);
    Event.addListener('slider_marble_min', 'click', function(ev){smarble.setValue(smarble.range[0]); Event.stopEvent(ev);});
    Event.addListener('slider_marble_max', 'click', function(ev){smarble.setValue(smarble.range[1]); Event.stopEvent(ev);});
    transporterCount.registerInput(smarble);
    var iglass = new valueInput('textfield_glass', [0, <?=floor($this->Player_Model->now_town->crystal)?>]);
    var sglass = new Slider('sliderthumb_glass', {'from':iglass,'dir' : 'ltr'});
    UIManager.connect(sglass,iglass);
    Event.addListener('slider_glass_min', 'click', function(ev){sglass.setValue(sglass.range[0]); Event.stopEvent(ev);});
    Event.addListener('slider_glass_max', 'click', function(ev){sglass.setValue(sglass.range[1]); Event.stopEvent(ev);});
    transporterCount.registerInput(sglass);
    var isulfur = new valueInput('textfield_sulfur', [0, <?=floor($this->Player_Model->now_town->sulfur)?>]);
    var ssulfur = new Slider('sliderthumb_sulfur', {'from':isulfur,'dir' : 'ltr'});
    UIManager.connect(ssulfur,isulfur);
    Event.addListener('slider_sulfur_min', 'click', function(ev){ssulfur.setValue(ssulfur.range[0]); Event.stopEvent(ev);});
    Event.addListener('slider_sulfur_max', 'click', function(ev){ssulfur.setValue(ssulfur.range[1]); Event.stopEvent(ev);});
    transporterCount.registerInput(ssulfur);