Normal
0
false
false
false
EN-US
X-NONE
HE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
Hi,
i have a application that uses ajax.net . the aspx page
inherits from masterpage.
i am using AutoCompleteExtender to enable autocomplete in
my application, and it works.
the problem is when i start typing in the textbox , the
autocomplete list moves and not exactly under the textbox.
i tried to place it manually by using OnClientShown = "AutoCompleteSearch_Show", and i
do get the event but when i try to re- locate the list it still moves.
for examle:
function AutoCompleteSearch_Show(sender,args) // sender
is the list
{
var oParent = $get('SearchBox');
//my textbox
var offesetLeft = 0; while (oParent!=null)
{
offesetLeft+=oParent.offsetLeft;
oParent =
oParent.offsetParent;
}
sender.style.left = offsetLeft;
}
and for example the result is 510px.
and still the list moves, but if i give to the list sender.style.left = '560px' the
list stops to move.
i checked the content of offesetLeft and it is '510px' .
* i do see that the result in the offsetLeft is not the
560px , but if i receive 510px i expect
the list to stay on this position and not to move,( may be the way i calculate
the position is wrong ).
second problem :
i am using internet explorer 6 with sp1 .
and there is a bug in this version , when div on listbox
or dropdown the listbox is shown and not the div.
i now that in this
case i need to use iframe and on the iframe to show the div.
this problem exists
in the AutoComplereExtender , and i found the solution in the internet
http://www.codeplex.com/AjaxControlToolkit/WorkItem/View.aspx?WorkItemId=15826
but , it doesn't work.
i think the reason is
connected to the first problem, because when i run the following code
the iframe does not moves to the potision of the list.
the code:
function AutoCompleteSearch_Show(sender,args)
{
var oList =
sender.get_completionList();
var oSpan = GetMainSpan(oList);
var iframe = oSpan.getElementsByTagName('IFRAME')[0];
iframe.style.width = oList.style.width;
iframe.style.height = oList.style.height; }
function GetMainSpan(oObj)
{
var oParent = oObj.parentElement;
while (oParent.tagName!='SPAN')
{
oParent = oParent.parentElement;
return oParent;
}
}
i am working on internet explorer 6 sp1 and windows 2003
sp1 with vs 2005 AjaxToolKit v 3.5 and System.Web.Extensions v 1.
waiting to yours suggestions.
p.s i tried to open new web project and connected
autocompleteextender to textbox, and without any changes it worked.
Thanks , Rony