3.2.0

event catch problems after refresh...

hi all,
great piece of work there... And loads of info in the forums... Been looking all around tryin to find some info about what i need it seems nobody tried it yet... I'm taking the data from xml. and putting it into an array cos, cant seem to get the xml table work on mozilla... even with the patch alex posted.
anyways... i'm getting the data normal, and my xml is dynamic so, i'm showing 20 data at a time, and when the user comes to the top or the bottom of the data with the up down keys 38, 40, i then re fire the xml via some php code, get the data from the database create a new xml and vola, new data on the page without flickering... now everything works fine upto here... but... when i come the top or the bottom of the page again... well thats when it gets ugly... i need to click on the table and then press up down keyboards.. now i know it got something to do with the events... anyways enough talking here is some code you guys more familiar with ....
var row = obj.getTemplate("row");
row.setEvent("onkeydown",function(){this.action("myAction")});
obj.setAction("myAction",function(src){
if( (event.keyCode==38) && (obj.getProperty("selection/index") == 0) ){
var i= obj.getProperty("selection/index");
alert (obj.getDataProperty("text",i , 0) );
tableArray ( obj.getDataProperty("text",i , 0) , 'k');	
obj.refresh();
obj.element().focus();
obj.setProperty("selection/index", 0); 
// obj.setAction("selectRow",1);
// document.getElementById('tag50.data.item:2').click();
// the last two lines are desperate tries different ways...
}
if( (event.keyCode==40) && (obj.getProperty("selection/index") == 19) ){
var i= obj.getProperty("selection/index");
alert (obj.getDataProperty("text",i , 0) );
tableArray ( obj.getDataProperty("text",i , 0) , 'b');	
obj.refresh();
obj.element().focus();
obj.setProperty("selection/index", 0);
obj.setSelectionValues([0]);
//dispatch(event,document.getElementById('tag50.data.item:2.item:2'));
// again some failed trials..	
}

} );


the funtion tableArray simply takes the selected item on the first row in this case the top or bottom first coloumn and sends it to my xml to get the next values...
this works fine the first time but if you try it again... well it focuses ok, but it doesnt catch the array....

thanks alot in advance...
hob
April 27,
sorry in the last bit, it should have been " well it focuses ok, but it doesnt catch the event...." not "well it focuses ok, but it doesnt catch the array...."
hob
April 27,
guys, i'll really in need of help here...
hob
April 29,
why hasnt someone try to answer my question??? I'm sure someone must have encountered it...
hob
May 2,
hello .... is this post invisble or something????
hob
May 3,

This topic is archived.

See also:


Back to support forum