Archive | ajax RSS feed for this section

ajax Beginnings (ASP.net)

8 Jun

For all of you loyal Microsoft .Net folks… I felt it was important to make a quick note about the earlier ajax Beginnings post. First and foremost, I understand that ASP.net can use the AJAX-Enabled Web Site template that puts the ScriptManager control on your form, and that the key to ajax done this way is using the UpdatePanel control. However, the earlier article can be used and applied using ASP.net if you choose (as long as classic asp is supported by Microsoft).

I will be adding additional .net specific articled in the future. With these articles I will help distinguish some of the different techniques that PHP programmers may employ versus the techniques that a .net programmer may employ.

All in all, the concepts behind using ajax with either development platform are very similar and based on the same things.

ajax Beginnings

1 Jun

I just completed a tutorial at http://www.tizag.com/ajaxTutorial/ in order to get a quick look at ajax…

The tutorial goes fairly fast and gives you the basic understanding of how ajax works. Overall ajax in itself is fairly simple. I would recommend going to the 3w site for the specification.

In general there are only a few key steps to use basic ajax:

  • Create the Object for the browser to use
  • Most browsers:

      ajaxRequest = new XMLHttpRequest();

    IE browsers:

      ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

    OR

      ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

  • Create a listener function for the state change
  • ajaxRequest.onreadystatechange = function(){ . . . }

  • Open and Send the request to your server side code
  • ajaxRequest.open("GET", "serverTime.php", true);
    ajaxRequest.send(null);

Follow

Get every new post delivered to your Inbox.