Hello,
I'm using a DotNetNuke 7.0 webservice and calling it from the autocomplete text box. I have a more complex version, but even this simple one isn't working:
I am getting a result from the service that comes in XML - here's an example result I got from firebug:
Here's the method being called:
But, the autocomplete box doesn't populate or display results. When I look in the code, the UL (racList) doesn't get any items added to it and it never displays.
All of the exact same stuff works in both Chrome and IE.
Any idea what's happening here? I noticed in the web service demo on your site that the results are in a JSON format...; could that be the problem?
Thanks,
Mike
I'm using a DotNetNuke 7.0 webservice and calling it from the autocomplete text box. I have a more complex version, but even this simple one isn't working:
<
telerik:RadAutoCompleteBox
runat
=
"server"
ID
=
"test"
>
<
WebServiceSettings
Method
=
"AutocompleteSearchUsers"
Path
=
"http://localhost/DesktopModules/CoreServices/API/UserService"
/>
</
telerik:RadAutoCompleteBox
>
I am getting a result from the service that comes in XML - here's an example result I got from firebug:
<
AutoCompleteBoxData
xmlns:i
=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns
=
"http://schemas.datacontract.org/2004/07/Telerik.Web.UI"
>
<
Items
>
<
AutoCompleteBoxItemData
>
<
Enabled
>true</
Enabled
>
<
Text
>Mike TEST Ryckman
</
Text
>
<
Value
>22173</
Value
>
</
AutoCompleteBoxItemData
>
<
AutoCompleteBoxItemData
>
<
Enabled
>true</
Enabled
>
<
Text
>Kirssa Cline Ryckman
</
Text
>
<
Value
>29</
Value
>
</
AutoCompleteBoxItemData
>
<
AutoCompleteBoxItemData
>
<
Enabled
>true</
Enabled
>
<
Text
>Kirssa Cline Ryckman</
Text
>
<
Value
>42</
Value
>
</
AutoCompleteBoxItemData
>
<
AutoCompleteBoxItemData
>
<
Enabled
>true</
Enabled
>
<
Text
>Mike Ryckman
</
Text
>
<
Value
>3</
Value
>
</
AutoCompleteBoxItemData
>
<
AutoCompleteBoxItemData
>
<
Enabled
>true</
Enabled
>
<
Text
>Kirssa Ryckman
</
Text
>
<
Value
>24</
Value
>
</
AutoCompleteBoxItemData
>
</
Items
>
</
AutoCompleteBoxData
>
Here's the method being called:
<DnnAuthorize()>
<HttpPost()>
Public
Function
AutocompleteSearchUsersTest(context
As
RadAutoCompleteContext)
As
AutoCompleteBoxData
Const
MaxRecords
As
Integer
= 5
Const
MinLength
As
Integer
= 2
Dim
serializer
As
New
JavaScriptSerializer
Dim
data
As
Dictionary(Of
String
,
Object
)
Dim
searchString
As
String
Try
data = serializer.Deserialize(Of Dictionary(Of
String
,
Object
))(context(
"context"
).ToString)
searchString = data(
"Text"
).ToString()
Catch
ex
As
Exception
searchString =
""
End
Try
Dim
output
As
New
AutoCompleteBoxData
If
searchString.Length >= MinLength
Then
Dim
results
As
New
List(Of AutoCompleteBoxItemData)
Dim
searchOutput
As
IEnumerable(Of UserInfo) = TestableUserController.Instance.GetUsersAdvancedSearch(PortalSettings.PortalId, UserController.GetCurrentUserInfo.UserID, -1, -1, -1,
False
, 0, 10,
"LastName"
,
True
,
"DisplayName"
, searchString).Take(MaxRecords)
Dim
curResult
As
AutoCompleteBoxItemData
For
Each
curUser
In
searchOutput
curResult =
New
AutoCompleteBoxItemData
curResult.Text = curUser.DisplayName
curResult.Value = curUser.UserID
results.Add(curResult)
Next
output.Items = results.ToArray
End
If
Return
output
End
Function
But, the autocomplete box doesn't populate or display results. When I look in the code, the UL (racList) doesn't get any items added to it and it never displays.
All of the exact same stuff works in both Chrome and IE.
Any idea what's happening here? I noticed in the web service demo on your site that the results are in a JSON format...; could that be the problem?
Thanks,
Mike