View Full Version : Need help for this one...

18 Apr 2007, 9:19 AM
I have some problem, this my code, modification from RSS Feed Viewer.

function getSLD (obj){
var sldOK = function(o){
var list_sld = Ext.get('sld');
list_sld.on('click', listsldClicked);

var tpl = new Ext.DomHelper.Template('<a id="{id}" name="{name}" href="{url}"><span class="body">{name}<br><span class="desc">{desc}</span></span></a>');

var slist = Ext.decode(o.responseText);
for (var id in slist) {
var f = slist[id];
if (id!='remove'){
if (id!='indexOf'){


function listsldClicked (e){
var a = e.getTarget('a');
if (a){
changeActiveList (a.id);
imgsld.setTitle(titleimg + ' : ' + a.name);

changeActiveList = function (listid){
YAHOO.util.Dom.removeClass(list_sld.dom.getElementsByTagName('a'), 'selected');
YAHOO.util.Dom.addClass(listid, 'selected');
unActiveList = function (){
YAHOO.util.Dom.removeClass(list_sld.dom.getElementsByTagName('a'), 'selected');


var params ={
params = Ext.urlEncode(params);
Ext.lib.Ajax.request('POST', 'scripts/jlistsld.php', {success:sldOK}, params);

for the first, it's run normally, but if i'm call for the second, i have some problem.
I get duplicate result. i want to clear first result and show the second result.

please tell me for the solution?