The following are the program i did......
and the problem im getting is object expected in onchange function at line 27(where i marked that one in bold for ur ease of identifying the error occuring area) in Task123.jsp. The value in not passed from Task123.jsp to Task113.js.


First Page : Task1.html
Expand|Select|Wrap|Line Numbers

1. <html>
2. <head>
3. <script type="text/javascript" src="Task11.js">
4. </script>
5. </head>
6.
7. <body>
8.
9. <form name="myform" method="post" action="">
10.
11. Select a Program:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
12. <select name="text1" style="width: 100px" onchange="showCustomer(document.myform.text1.value)">
13. <option value="unbounded">unbounded</option>
14. <option value="Program 1">Program 1</option>
15. <option value="Program 2">Program 2</option>
16. </select>
17.
18. </form>
19.
20. <div id="txtHint"><b>Program info will be listed here.</b></div>
21.
22. </body>
23. </html>
24.


second page : Task11.js

Expand|Select|Wrap|Line Numbers

1. var xmlhttp
2.
3. function showCustomer(str)
4. {
5. xmlhttp=GetXmlHttpObject();
6. if (xmlhttp==null)
7. {
8. alert ("Your browser does not support AJAX!");
9. return;
10. }
11. var url="Task123.jsp";
12. url=url+"?q="+str;
13. url=url+"&sid="+Math.random();
14. xmlhttp.onreadystatechange=stateChanged;
15. xmlhttp.open("GET",url,true);
16. xmlhttp.send(null);
17. }
18.
19. function stateChanged()
20. {
21. if (xmlhttp.readyState==4)
22. {
23. document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
24. }
25. }
26.
27. function GetXmlHttpObject()
28. {
29. if (window.XMLHttpRequest)
30. {
31. // code for IE7+, Firefox, Chrome, Opera, Safari
32. return new XMLHttpRequest();
33. }
34. if (window.ActiveXObject)
35. {
36. // code for IE6, IE5
37. return new ActiveXObject("Microsoft.XMLHTTP");
38. }
39. return null;
40. }
41.


Third page : Task123.jsp

Expand|Select|Wrap|Line Numbers

1. <%@ page import="java.sql.*" %>
2. <%
3. String connectionURL = "jdbc:mysql://localhost/new";
4. Connection connection = null;
5. Statement statement;
6. ResultSet rs;
7. %>
8.
9. <html>
10. <head>
11. <script type="text/javascript" src="Task113.js">
12. </script>
13. </head>
14. <body>
15.
16. <%
17. String s=request.getParameter("q");
18. Class.forName("com.mysql.jdbc.Driver");
19. connection = DriverManager.getConnection(connectionURL, "root", "cng");
20. statement = connection.createStatement();
21. rs = statement.executeQuery("SELECT prid FROM project where pid='"+s+"'");
22. String targetId=request.getParameter("q");
23. %>
24.
25. <form name="myform1" method="post" action="Task113.jsp">
26. Projects for Program are :&nbsp;&nbsp;
27. <select name="project" id="project" style="width: 100px" onChange="showCustomer6(document.myform1.project.value)">
28.
29. <%
30. while(rs.next())
31. {
32. String result=rs.getString(1);
33. String home="unbounded";
34. %>
35. <%
36. out.println(s+" consist of :<br>");
37. if(targetId.equalsIgnoreCase("unbounded"))
38. {%>
39. <option value="<%= home %>">
40. <% out.println(home); %>
41. </option>
42. <%}
43. else if(targetId.equalsIgnoreCase("Program 1"))
44. {%>
45. <option value="<%= result %>">
46. <% out.println(result); %>
47. </option>
48. <%}
49. else
50. {%>
51. <option value="<%= result %>">
52. <% out.println(result); %>
53. </option>
54. <%}
55. }
56. %>
57. </select>
58.
59. </form>
60. </body></html>
61.

Forth page : Task113.js

Expand|Select|Wrap|Line Numbers

1. var xmlhttp
2.
3. function showCustomer6(str)
4. {
5. alert("1");
6. xmlhttp=GetXmlHttpObject();
7. if (xmlhttp==null)
8. {
9. alert ("Your browser does not support AJAX!");
10. return;
11. }
12. var url="dummy.jsp";
13. url=url+"?q1="+str;
14. url=url+"&sid="+Math.random();
15. xmlhttp.onreadystatechange=stateChanged;
16. xmlhttp.open("GET",url,true);
17. xmlhttp.send(null);
18. }
19.
20. function stateChanged()
21. {
22. if (xmlhttp.readyState==4)
23. {
24. document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
25. }
26. }
27.
28. function GetXmlHttpObject()
29. {
30. if (window.XMLHttpRequest)
31. {
32. // code for IE7+, Firefox, Chrome, Opera, Safari
33. return new XMLHttpRequest();
34. }
35. if (window.ActiveXObject)
36. {
37. // code for IE6, IE5
38. return new ActiveXObject("Microsoft.XMLHTTP");
39. }
40. return null;
41. }
42.
43.

Fifth and the Final page : dummy.jsp

Expand|Select|Wrap|Line Numbers

1. <%@ page import="java.sql.*" %>
2. <%
3. String connectionURL = "jdbc:mysql://localhost/new";
4. Connection connection = null;
5. Statement statement1 = null;
6. ResultSet rs1 = null;
7. %>
8.
9. <html><body>
10.
11. <%
12. String s1=request.getParameter("q1");
13. out.println("String is "+s1);
14. Class.forName("com.mysql.jdbc.Driver");
15. connection = DriverManager.getConnection(connectionURL, "root", "cng");
16. statement1 = connection.createStatement();
17. rs1 = statement.executeQuery("SELECT * FROM task1 where prid='"+s1+"'");
18. %>
19. <table border=1>
20. <%while(rs1.next()) {%>
21. <tr><td>
22. <%
23. out.println(rs1.getString("tid")+"<br>");
24. %>
25. </td>
26. </tr><tr><td>
27. <%
28. out.println(rs1.getString("tname")+"<br>");
29. %>
30. </td>
31. </tr><tr><td>
32. <%
33. out.println(rs1.getString("prid")+"<br>");
34. %>
35. </td>
36. </tr><%
37. }
38. %></table><%
39.
40. rs1.close();
41.
42. %>
43.
44. </body></html>.
45.

eagerly waiting for ur quick reply.thanks in advance.

<form name="myform1" method="post" action="Task113.jsp">

i removed the task113.js from action.the problem im getting is
document.myform1.project.value is null or not an object.

i removed the task113.js from action.the problem im getting is
document.myform1.project.value is null or not an object in the onchange method.

Because the event handler onChange="showCustomer6(document.myform1.project.value)" is specified within the <select name="project"> tag you can simplify it to onChange="showCustomer6(this.value)" .

However, it seems more likely that your problem is caused by non-inclusion of the js file containing function showCustomer6(){...}. Is the path to the .js file correct in the tag <script ... src="Task113.js"></script> ?

Also, I see that Task113.jsp (server-side) and Task113.js (client-side) are involved. Is this intentional? It's not necessarily an error but maybe a source of potential confusion.

Airshow

ya the source for the script is right.and i change the values in onchange method too,as per ur answer.but,what now im getting is,the values in the second drop down box(ie., in Task123.jsp) is not available after selecting a particular one.everything present in that gets hide.

Firstly, the jsp line out.println(s+" consist of :<br>"); looks wrong because it occurs in a loop designed to compose options with in a select menu, where <br> has no meaning. Also, I may be mistaken but targetId has the same value each time through the while(rs.next()) loop, so surely that means all options in the select menu will always be identical? At the very least, this code can be simplified if not fixed.

As for the rest of it, I can't be certain but it appears that the code is supposed to work as follows :

  • On selecting an item in the "project" menu, the javascript code in Task113.js attempts to perform an Ajax call, which should return a string to be displayed in the div "txtHint".
  • In case Ajax is unavailable to the client (browser) or a successfully submitted Ajax call results in failure, an alternative mechanism is provided; namely a conventional (non-Ajax) Form submission to Task113.jsp, which is (or should be) designed to re-serve the whole page with "txtHint" populated to show the relevant string. (Graceful degradation).

However, as currently written there is nothing to cause the alternative action (Form submision) to take place when :

  1. Ajax is unavailable to the client (browser)
  2. An Ajax call is available but the reponse fails

If I am right, then the code can be modified as follows :

function showCustomer6(str, form){ //NOTE: second parameter
	xmlhttp = GetXmlHttpObject();
	if (xmlhttp==null){
		form.submit(); //ajax not available - initiate alternative action.
		return;
	}
	function stateChanged(){ //by making stateChanged an inner function of showCustomer6(), 'form' is still available (through closure).
		if (xmlHttp.readyState == 4){
			if (xmlHttp.status == 200){
				document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
			}
			else{
				form.submit(); //ajax response failure - initiate alternative action.
			 }
		}
	}
	var url = 'dummy.jsp?' + 'q1=' + str + '&sid=' + Math.random(); //make sure that dummy.jsp exists (and returns the required string) or is replaced with the name of a jsp script that does exist.
	xmlhttp.onreadystatechange = stateChanged;
	xmlhttp.open("GET", url, true);
	xmlhttp.send(null);
}

Then in the HTML:

<select name="project" id="project" style="width:100px" onChange="showCustomer6(this.value, this.form)">

For explanation, see comments in code.
Off-the-cuff - not tested.

Airshow

Thanks for ur reply......
but what the problem im actually facing is that,cannot able to call from the jsp(Task123.jsp) to js(Task113.js).
The method showcustomer6(this.value,this.form) is not working,because of its an jsp.
if i execute this part seperately means its working nicely.
The problem is calling the program in a chain......one after another and again one after another.
pls guide me through to solve this problem sir.........
once again thank u for helping me.........
im eagerly waiting for ur reply sir........

if i use showcustomer6(document.myform1.project.value) instead of showcustomer6(this.value,this.form),im getting the error

document.myform1.project is null or not an object error.

even if i use a input button too in the jsp(Task123.jsp),it is not calling the showcustomer function.

The error is mainly for the reason,im calling the jsp to send request to js that too in the middle of the program.

even if i use a input button too in the jsp(Task123.jsp), it is not calling the showcustomer function.

You need to get your mind round the way the server-side scripts (jsp) and the client-side scripts (javascript) interact.

A jsp script simply cannot call a javascript function.

However, a javascript function can call a jsp script in one of two main ways:

  • Conventional: By stimulating a page refresh, eg. location.replace() or form.submit().
  • AJAX: An asynchronous xmlhttp request, which (if successful) will return a string result back to the xmlhttp.onreadystatechange handler.

Your showcustomer6() function is written to make an AJAX call (currently to dummy.jsp), which means that form submission is not necessary except for graceful degradation (in case of AJAX failure) or for a reason other than that associated with showcustomer6()/txtHint.

Read and try to understand my in-code comments above.

Airshow

you are saying that,the server side program jsp will not call the client side program javascript.........but its not like that.......
its working..........when we run the third page at first(ie.,Task123.jsp) is calling the javascript(ie., ajax page(Task113.js)) and the call continued to the dummy.jsp......
but when we work in a chain manner(ie., Task1.html to Task11.js to Task123.jsp to Task113.js and finally to dummy.jsp)its not working...

pls help......otherwise give me a code for this..........


1.first thing is,we have to get a details of a program from back end using drop down box.......and again in selecting that program drop down box,we have to get project details in another drop down box.......finally we have to select a particular project in that drop down,which should provide task details in the same window(not in drop down or other things)....
with the use of jsp and ajax too...........


pls help me..........
im wasting my days in this particular concept sir...........
pls sir help me.............
eagerly waiting for ur quick reply sir..........

Here's an example of what I think you are trying to achieve.

Task1.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
.cascade { margin-top:6px; }
</style>
<script type="text/javascript" src="get_xml_http_object.js"></script>
<script type="text/javascript" src="ajax_cascade.js"></script>
</head>

<body>
<form name="myform_1" method="post" action="">
<div id="cascade_0" class="cascade">
	Select a Program:&nbsp;&nbsp;
	<select name="text1" style="width:100px" onchange="ajaxCascade('Task123.html?q=' + this[this.selectedIndex].value, 'cascade_1', true)">
		<option value="unbounded">unbounded</option>
		<option value="Program 1">Program 1</option>
		<option value="Program 2">Program 2</option>
	</select>
</div>
<div id="cascade_1" class="cascade"></div>
</form>
</body>
</html>

Task123.html

Projects for Program are :&nbsp;&nbsp;
<select name="project" id="project" style="width:100px" onchange="ajaxCascade('dummy.html?q=' + this[this.selectedIndex].value, 'cascade_2', true)">
	<option value="unbounded">unbounded</option>
	<option value="Project 1">Project 1</option>
	<option value="Project 2">Project 2</option>
</select>
<div id="cascade_2" class="cascade"></div>

dummy.html

<table border="1">
<tr><td>aaa</td></tr>
<tr><td>bbb</td></tr>
<tr><td>ccc</td></tr>
<tr><td>xxx</td></tr>
<tr><td>yyy</td></tr>
<tr><td>zzz</td></tr>
</table>

ajax_cascade.js

function ajaxCascade(url, nextCascadeElementId, appendCacheBuster){
	var xmlhttp = GetXmlHttpObject();
	if (xmlhttp==null){
		alert ('Your browser does not support AJAX!');
		return;
	}
	if(appendCacheBuster){
		url = url + (url.indexOf('?') == -1 ? '?' : '&')  + 'sid=' + Math.random();
	}
	xmlhttp.onreadystatechange = function(){
		if (xmlhttp.readyState==4){
			document.getElementById(nextCascadeElementId).innerHTML = xmlhttp.responseText;
		}
	};
	xmlhttp.open("GET", url, true);
	xmlhttp.send(null);
}

get_xml_http_object.js

function GetXmlHttpObject(){
	if (window.XMLHttpRequest){
		// code for IE7+, Firefox, Chrome, Opera, Safari
		return new XMLHttpRequest();
	}
	if (window.ActiveXObject){
		// code for IE6, IE5
		return new ActiveXObject("Microsoft.XMLHTTP");
	}
	return null;
}

NOTES :

  1. Pages are hard coded HTML, so so you still have some work to do to reconstruct your JSPs.
  2. Task123.html and dummy.html comprise HTML fragments, not whole pages - ie. no doctype, head of body tags - just the bit of HTML we are interested in. This is necessary because the fragments are inserted into the "host page" (Task1.html) which has its own doctype etc.
  3. Just two Javascript functions are necessary - GetXmlHttpObject() and ajax_cascade() - avoiding duplication of identical or near identical functions.
  4. The detailed behaviour of ajax_cascade() is controlled with parameters passed from the onchange="...." handlers in Task1.html and Task123.html, thus tailoring it to the specific needs of these two pages.
  5. There are many other ways to structure the HTML/Javascript to achieve the same overall effect. This is just one way.

Enjoy

Airshow

you run this its working.here the first page is jsp only which calls the javascript (task113.js)..........

Task123.jsp

<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost/new";
Connection connection = null;
Statement statement;
ResultSet rs;
%>

<html>
<head>
<script type="text/javascript" src="Task113.js">
</script>
</head>
<body>

<%
//String s=request.getParameter("q");
String s="program 1";
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL, "root", "cng");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT prid FROM project where pid='"+s+"'");
%>

<form name="myform1" method="post" action="">
Projects for Program are :&nbsp;&nbsp;
<select name="text11" style="width: 100px" onchange="showCustomer(this.value)">
<option value=""><---select---></option>
<%
while(rs.next())
{
String result=rs.getString(1);
%>
    <%
    out.println(s+" consist of :<br>");
    if(s.equalsIgnoreCase("Program 1"))
    {%>
    <option value="<%= result %>">
    <%  out.println(result); %>
    </option>
    <%}
    else
    {%>
    <option value="<%= result %>">
    <%   out.println(result); %>
    </option>
    <%}
}
    %>
</select>

<!--input type="text" name="text1"/>
<input type="button" onclick="showCustomer(text1.value)" value="click"/-->

</form>

<div id="txtHint"><br><b>Project info will be listed here.</b></div>


</body></html>



Task113.js


var xmlhttp

function showCustomer(str)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
  alert("1");
var url="dummy.jsp";
url=url+"?q1="+str;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
  }
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}



dummy.jsp


<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost/new";
Connection connection = null;
Statement statement1 = null;
ResultSet rs1 = null;
%>

<html><body>

<%
    String s1=request.getParameter("q1");
    out.println("String is "+s1);
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL, "root", "cng");
statement1 = connection.createStatement();
rs1 = statement1.executeQuery("SELECT * FROM task1 where prid='"+s1+"'");
%>
<table border=1>
<%while(rs1.next()) {%>
<tr><td>
<%
    out.println(rs1.getString("tid")+"<br>");
    %>
</td>
<td>
<%
    out.println(rs1.getString("tname")+"<br>");
    %>
</td>
<td>
<%
    out.println(rs1.getString("prid")+"<br>");
    %>
</td>
</tr><%
}
%></table><%

rs1.close();

%>

</body></html>

send the code with retrieving values from back end........for the above program you sent..........how could we connect back end with html code..........for that we have to use jsp know........thats why im asking you to send program using back end........pls help..........

send the code with retrieving values from back end........for the above program you sent..........how could we connect back end with html code..........for that we have to use jsp know........thats why im asking you to send program using back end........pls help..........

Positively NO!

Now you're taking the mickie! Did you read my NOTES?

I come to Daniweb to help people, not to do the whole job for them. I have led you by the hand for two days and now you need to think for yourself.

You know what the server-side jsp code looks like and it will be quite simple for you to re-integrate it with my sample HTML to make it work in full.

From this point on, you are on your own.

Airshow

ok sir,thank u for ur advice and help........
Now everything is working fine..........but document.getElementById is null or not an object error is coming sir..........

Pls look the below coding.......

Task1.jsp

<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost/new";
Connection connection = null;
Statement statement;
ResultSet rs;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
.cascade { margin-top:6px; }
</style>
<script type="text/javascript" src="get_xml_http_object.js"></script>
<script type="text/javascript" src="ajax_cascade.js"></script>
</head>
<body>
<%
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL, "root", "cng");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT pid FROM program");
%>
<form name="myform_1" method="post" action="">
<div id="cascade_0" class="cascade">
Select a Program:&nbsp;&nbsp;
<select name="text1" style="width:100px" onchange="ajaxCascade('Task123.jsp?q='+
this[this.selectedIndex].value, 'cascade_1', true)">
<option value=""><---select---></option>
<%
while(rs.next())
{
String result=rs.getString(1);
%>
    <%
    out.println("Program consist of :");
    %>
    <option value="<%= result %>">
    <%  out.println(result); %>
    </option>
    <%
}
    %>
</div>
<div id="cascade_1" class="cascade"></div>
</form>
</body>
</html>


Task123.jsp

<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost/new";
Connection connection = null;
Statement statement;
ResultSet rs;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>

 </HEAD>

 <BODY>
 <%
String s=request.getParameter("q");
out.println(s);
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL, "root", "cng");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT prid FROM project where pid='"+s+"'");
%>
    <form name="myform_2" method="post" action="">
  Projects for Program are :&nbsp;&nbsp; 
  <select name="project" id="project" style="width:100px" onchange="ajaxCascade('dummy.jsp?q=' + this[this.selectedIndex].value, 'cascade_2', true)"> 
  <option value=""><---select---></option>
<%
while(rs.next())
{
String result=rs.getString(1);
%>
    <%
    out.println(s+" consist of :<br>");
    if(s.equalsIgnoreCase("Program 1"))
    {%>
    <option value="<%= result %>">
    <%  out.println(result); %>
    </option>
    <%}
    else
    {%>
    <option value="<%= result %>">
    <%   out.println(result); %>
    </option>
    <%}
}
    %>
  </select> 
  <div id="cascade_2" class="cascade"></div>
  </form>
 </BODY>
</HTML>


dummy.jsp

<%@ page import="java.sql.*" %>
<%
String connectionURL = "jdbc:mysql://localhost/new";
Connection connection = null;
Statement statement1 = null;
ResultSet rs1 = null;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>

 </HEAD>

 <BODY>
 <%
    String s1=request.getParameter("q");
    //out.println("String is "+s1);
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(connectionURL, "root", "cng");
statement1 = connection.createStatement();
rs1 = statement1.executeQuery("SELECT * FROM task1 where prid='"+s1+"'");
%>
<table border=1>
<%while(rs1.next()) {%>
<tr><td>
<%
    out.println(rs1.getString("tid")+"<br>");
    %>
</td>
<td>
<%
    out.println(rs1.getString("tname")+"<br>");
    %>
</td>
<td>
<%
    out.println(rs1.getString("prid")+"<br>");
    %>
</td>
</tr><%
}
%></table><%

rs1.close();

%>
 </BODY>
</HTML>



ajax_cascade.js


In this page document.getElementById(nextCascadeElementId).innerHTML = xmlhttp.responseText; only im getting error sir............
That too i printed the xmlhttp.responseText before this line sir.......
with the use of alert command...........alert(xmlhttp.responseText);
it showing the correct output sir.........but while assigning it to 
document.getElementById(nextCascadeElementId).innerHTML = 
this line its not working sir.........error is not null or not an object sir........(nextCascadeElementId only problem now sir).......

code:

function ajaxCascade(url, nextCascadeElementId, appendCacheBuster)
{ 
    var xmlhttp = GetXmlHttpObject(); 
    if (xmlhttp==null)
    { 
        alert ('Your browser does not support AJAX!'); 
        return; 
        } 
        if(appendCacheBuster)
        { 
            url = url + (url.indexOf('?') == -1 ? '?' : '&') + 'sid=' + Math.random(); 
            alert(url);
            alert(nextCascadeElementId);
            } 
            xmlhttp.onreadystatechange = function()
            { 
                if (xmlhttp.readyState==4)
                { 
                    alert("!");
                    alert(nextCascadeElementId);
                    alert(xmlhttp.responseText);
                document.getElementById(nextCascadeElementId).innerHTML = xmlhttp.responseText; 
                } 
                }; 
                xmlhttp.open("GET", url, true); 
                xmlhttp.send(null); 
                }

Thank u for guiding me sir........
I have finished the concept successfully with ur kind help sir.........
thank u sir,thank u very much.............

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.