Codeasearch.com - Search your code with us Login | Register | Contact us
  Forums > Ajax > Basic Ajax
forums_reader
Posted on Jul 20, 2007
Join Date: July 2007
Location: India ( Chennai )
Posts: 24
 
Basic Ajax  

Save the file as "testAjax.asp"
<html>
<head>
<title>:: Ajax ::</title>
<script language="javascript">
function ajaxSide(strQuery) {
'Pass url with Query String
strUrl = "serverside.asp?q="+strQuery;

'Creating the ajax
'sending value to serverside file.
var xmlhttp = new ActiveXObject("Microsoft.Xmlhttp");
xmlhttp.open("GET",strUrl,false);

xmlhttp.send(strUrl);

'Get's value from serverside
DivMsg.innerHTML = xmlhttp.responseText;
}
</script>
</head>
<body>

Check the file loading content from serverside to client side using Ajax.<br />
<a href="javascript:ajaxSide(1);">1</a> <br />
<a href="javascript:ajaxSide(2);">2</a> <br />
<div id="DivMsg"></div>

</body>
</html>
---------------End Here ------------


Save the page as "serverside.asp"
<%
q = request("q")

if(q=1) then
Response.Write("One")
elseif(q=2) then
Response.Write("Two")
end if
%>

luther singh
Posted on Aug 3, 2007
Join Date: August 2007
Location: India ( chennai )
Posts: 1
 
Ajax with Asp.net 2.0  

Hi This is luther from chennai. i want to learn ajax with asp.net. is there any website for learning ajax pls help me. thnks

 Hot Discussion
Go Tech launches Android tablet for Rs 3,999...
Sony targets retailers with quick sales pitches and rew...
Share and discover new activities with Google Schemer...
Samsung gets 9 mn preorders for Galaxy S3: Report...
Google revamps search engine to think like a person...
 
 Discussion Topics
IT News
Php
Javascript
Technology Updates
Asp.Net
MySql
Ajax
Html
Fedora
Software Testing
Asp
Java
General
Flash
Ruby on Rails