Advertisement

05.16.2008 at 03:16AM PDT, ID: 23407800
[x]
Attachment Details

jsp ajax help

Asked by pothios in Java Servlets, JavaScript, Java Server Pages (JSP)

Tags:

Hello, i have a jsp page which will retrieve user id when loaded. after adding the ajax code in (below), it works but i ave to manually press refresh for the use data to be update. how do i solve this? thnaksStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
function update_item(name, obj)
	{
		
		
		var Name = document.getElementById('Name').value; 
		
		var page = "MyServlet";
		page += "?name=" + name + ";
		
		page += "&action=update";
 
		document.getElementById('updateButton').value='Updating...';
		document.getElementById('updateButton').disabled=true;
 
		var displayloading = true;
		
		var xmlHttp = GetXmlHttpObject();
		
		xmlHttp.onreadystatechange=function()
		{
			document.getElementById('updateButton').value='Update';
			document.getElementById('updateButton').disabled=false;
		}
		
		xmlHttp.open("GET",page,true);
		xmlHttp.send(null);
	}
[+][-]05.16.2008 at 04:13AM PDT, ID: 21581725

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Servlets, JavaScript, Java Server Pages (JSP)
Tags: jsp ajax
Sign Up Now!
Solution Provided By: ineya
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.17.2008 at 01:17AM PDT, ID: 21588396

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.17.2008 at 02:19AM PDT, ID: 21588529

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.17.2008 at 02:20AM PDT, ID: 21588531

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628