3.2.0

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
July 22,
I solved this issue by replacing the last line of code as following:

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

This topic is archived.

See also:


Back to support forum