I cannot get the autocomplete example to work for me. I keep getting an "object expected" error in the autocomplete.js file when it executes the line of code:
MS.Web.AutoComplete = Class.create(); I have read other responses to this problem and have implemented the changes suggested to no avail. Any help would be greatly appreciated. I am using vs2005 and obviously the AJAXPro.2.dll. My code is listed below...as you'll see, at this point I am doing nothing with the code, I'm simply trying to load the page without any errors. html code: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <script type="text/javascript" src="autocomplete.js"></script> <script language="javascript" type="text/javascript"> function init() { ////// var x = new MS.Web.AutoCompleteDataTable("searchPeople", 10); ////// x.getDisplay = function(item) { ////// return (item != null ? item.fname : ""); ////// } ////// ////// x.getValue = function(item) { ////// return (item != null ? item.fname.toString().trimRight() : ""); ////// } ////// ////// x.getData = function() { ////// ajaxdropdown.clsAJAXMethods.getNames(this.ele.value, this.count, this.callback.bind(this)); ////// } } </script> <body onload="init()"> <form id="form1" runat="server" > <input id="searchPeople" name="searchPeople" type="text" /> </form> </body> </html> codebehind code: <AjaxPro.AjaxNamespace("AutoComplete")> _ Partial Class _Default Inherits System.Web.UI.Page Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load AjaxPro.Utility.RegisterTypeForAjax(GetType(clsAJAXMethods), Page) End Sub End Class web.config file: <?xml version="1.0"?> <configuration> <configSections> <sectionGroup name="ajaxNet"> <!-- If you are using Microsoft .NET 1.1 please remove the two attributes requirePermission and restartOnExternalChanges, they are only supported with .NET 2.0. --> <section name="ajaxSettings" type="AjaxPro.AjaxSettingsSectionHandler,AjaxPro.2" requirePermission="false" restartOnExternalChanges="true" /> </sectionGroup> </configSections> <ajaxNet> <ajaxSettings> <urlNamespaceMappings useAssemblyQualifiedName="false" allowListOnly="false"> <!-- Set the attribute useAssemblyQualifiedName to true to enable use of assemblies placed in the GAC by using the full assembly qualified name. To hide internal knowledge of assemblies, classes and namespace you can override the name of the virtual http endpoints. <add type="Namespace.Class1,Assembly" path="mypath" /> --> </urlNamespaceMappings> <jsonConverters> <!-- This section can be used to add new IJavaScriptConverters to the Ajax.NET Professional engine. If you want to disable built-in converters you can use the remove tag. <remove type="Namespace.Class1,Assembly"/> <add type="Namespace.Class2,Assembly"/> <add type="AjaxPro.BitmapConverter,AjaxPro.2" mimeType="image/jpeg" quality="100"/> --> </jsonConverters> <!-- Set the enabled attribute to true to get Stack, TargetSize and Source information if an exception has been thrown. --> <debug enabled="false" /> <!-- This is the default configuration used with Ajax.NET Professional. You can put there your static JavaScript files, or remove the path attribute to completly disable the files. <scriptReplacements> <file name="prototype" path="~/ajaxpro/prototype.ashx" /> <file name="core" path="~/ajaxpro/core.ashx" /> <file name="converter" path="~/ajaxpro/converter.ashx" /> <file name="ms" path="~/ajaxpro/ms.ashx" /> </scriptReplacements> --> <!-- <encryption cryptType="" keyType="" /> --> <!-- Set the enabled attribute to true to enable the use of an Ajax.NETProfessional token. This will send a token to the client that will be used to identify if the requests comes from the same PC. --> <token enabled="false" sitePassword="password" /> <!-- The oldStyle section can be used to enable old styled JavaScript code or functions that are not used any more. <oldStyle> <objectExtendPrototype/> <appCodeQualifiedFullName/> <allowNumberBooleanAsString/> <sessionStateDefaultNone/> <includeMsPrototype/> </oldStyle> --> <oldStyle> <includeMsPrototype/> </oldStyle> </ajaxSettings> </ajaxNet> <!-- Common ASP.NET configuration --> <appSettings/> <connectionStrings/> <system.web> <compilation debug="true"/> <authentication mode="Forms"/> <httpModules> <!-- This HttpCompressionModule is only working for requests in "ajaxpro" folder. The module is available for ASP.NET 2.0. <add name="HttpCompressionModule" type="AjaxPro.HttpCompressionModule,AjaxPro.2"/> --> </httpModules> </system.web> <!-- Handler configuration for Ajax.NET Professional --> <location path="ajaxpro"> <system.web> <httpHandlers> <add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/> </httpHandlers> <!-- If you need to have Ajax.NET Professional methods running on the login page you may have to enable your own authorization configuration here. --> <!-- <authorization> <deny users="?"/> </authorization> --> </system.web> </location> <!-- If you are using Ajax.NET Professional with forms authentication you may need to allow ASP.NET to have access to following three files. --> <location path="ajaxpro/prototype.ashx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> <location path="ajaxpro/core.ashx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> <location path="ajaxpro/converter.ashx"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> </configuration> Any help would be GREATLY appreciated.... Thanks, Ryan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ajaxpro The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/ Don't forget to read my blog at http://weblogs.asp.net/mschwarz/ The open source project is now located at http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxPro -~----------~----~----~----~------~----~------~--~---
