Search Tools Links Login

AJAX with VB

Working of AJAX with VB. When you want to get data directly from server. Very useful in ASP Applications, when you need to create dynamic and interactive pages without refreshing page and without making a roundtrip to server. This was made popular in 2005 by Google Suggest.
Google Suggest is using the XMLHttpRequest of Java Script object to create a very dynamic web interface: When you start typing in Google's search box, a JavaScript sends the letters off to a server and the server returns a list of suggestions.

Original Author: M.Mehdi


Private Sub Command1_Click()
  Dim objXml
  Set objXml = CreateObject("Msxml2.XMLHTTP") "GET", "", True
  objXml.send (Null)
  If Not objXml Is Nothing Then
    If objXml.readyState = 4 Then
      MsgBox "Time at Web is: " & objXml.responseText
    ElseIf objXml.readyState = 1 Then
      GoTo ReGet
    End If
  End If
  Set objXml = Nothing
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 123 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.