:: Forum >>

How to set scroll position for AW.Templates.Combo?

I am changing my AW.UI.Combo to AW.Templates.Combo. I used following code to get the selected item on top of the list of UI.Combo:
var ddl=new AW.UI.Combo;
ddl.showPopup1 = ddl.showPopup;
ddl.showPopup = function(){
this.showPopup1();
this.getPopupTemplate().setSize(300,500);
this.getViewTemplate().element().parentNode.scrollTop = this.getCurrentItem()*16.0;
};

It works fine on AW.UI.Combo. Now I tried to copy the above function to AW.Templates.Combo:

var ddl=new AW.Templates.Combo;
ddl.showPopup2 = ddl.showPopup;
ddl.showPopup = function(){
this.showPopup2();
this.getPopupTemplate().setSize(300,500);
this.getViewTemplate().element().parentNode.scrollTop = 100;
};

It doesnÂ’t work on AW.Templates.Combo. The last line of code caused an error. Please advise how to replace this code.

I am using 2.5.2 full version on XP, IE7.

Thanks,
mrhsh
Tuesday, July 22, 2008
I solved this issue by replacing the last line of code as following:

this.getPopupTemplate().getScrollTemplate().element().parentNode.scrollTop =100;
mrhsh
Tuesday, July 22, 2008

This topic is archived.


Back to support forum

Forum search