Saturday, March 24, 2012

Pure Ajax alternative for this atlas code

I want's to find out what will be the pure ajax that is client side script to get autocomplete functionality

that is for this atlas code
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
<div>
Enter a Name:
<asp:TextBox ID="txtName" runat="server" />
<atlas:AutoCompleteExtender ID="au" runat="server">
<atlas:AutoCompleteProperties Enabled="true" MinimumPrefixLength="1"
ServiceMethod="GetNames" ServicePath="MyNameService.asmx" TargetControlID="txtName" />
</atlas:AutoCompleteExtender>
</div>
</form>
where web service is

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class MyNameService : System.Web.Services.WebService {

public MyNameService () {

//Uncomment the following line if using designed components
//InitializeComponent();
}

[WebMethod]
public string[] GetNames(string prefixText, int count)
{
ArrayList filterList = new ArrayList();
string[] names = { "AzamSharp", "Scott", "Simon", "Alan", "Michael", "Jane", "Janice" };

foreach (string str in names)
{
if (str.ToLower().StartsWith(prefixText.ToLower()))
{
filterList.Add(str);
}
}

return (string[]) filterList.ToArray(typeof(string));

}

[WebMethod]
public string HelloWorld() {
return "Hello World";
}

}

Hi,

can you tell us why you don't want to use Atlas? Is it because you're developing with ASP.NET 1.x? If so you can take a look at Ajax.NET.

Grz, Kris.


the example here does something along along the lines of what your looking for

http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=12


Mr X!!!
My Only Problem is lack of browsers support by atlas Like opera other it is the best and easiest of all ajax based technologies.
Mr X!!!
My Only Problem is lack of browsers support by atlas Like operaotherwise it is the best and easiest of all ajax based technologies.

hello.

though i haven't done it, i beleiver that you can try to adapt atlas to opera by writting a compat layer for it...i also don't know if one is needed...


Opera support is possible but it is currently a problem because of browser detection. A big issue is the lack of defineGetter and defineSetter mechanism. There would simply be no way to define custom DOM properties, in other words Atlas cannot have a compatability layer based on IE but would have to have use W3C DOM and create a compatability layer for IE.

There is really a lot of merit to this. Has the team considered this at all? I realize the IE dom was chosen as the base for reason of convenience (and I have read why) but there seems to be a few very good reasons to base it on W3C.

Not only would a W3C based Atlas that provides compatability layers for all browsers be The Right Thing but I think it can greatly help Atlas adoption throughout the whole web development community, not only the ASP/.NET/Windows/... community. I have already seen flame wars start because of this. There are tons more reasons I can think of why the W3C model for Atlas would be great.

The only reason I can think of for supporting the IE DOM model is to attract those more familiar with the model (ME!!!!).

Opera is an interesting browser with many oddities and a tiny market share (last I checked less than 2 percent) and I am sure before a full version of Atlas is released Atlas will support Opera. I personally do not worry about Opera too much, I am more interested in full Safari support.

REQEST: The Safari compatability layer can really use a unified solution for loading dynamic scripts. I currently have to use callbacks within the dynamically loaded script to know it is available... no onload or readystatechange... not cool. An iframe solution seems possible but I have not tried this yet. Another solution is to use a webrequest and eval but also have not tried this yet.


hum...man, i really love opera! btw, have you noticed that it has passed the acid test (version 9 beta)?

Luis - yeah I think Opera has the right idea make all their browsers (mobile, device and pc) run the same way. I've been playing with Opera 9 beta and its looking pretty good so far. I really think they need to rethink Opera and make it less complex for the novice users. I can see why a developer has an option to identify as Mozilla but a regular user? I personally wouldn't recommend Opera to my mom/dad...


hello again.

well, sorry, this is a biased opinion :) i recommend opera to everyone!

No comments:

Post a Comment