This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to use ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to use ajax" Watch "how to use ajax" New topic

how to use ajax

shyamkumar bopannachengalaiah
Ranch Hand

Joined: Dec 30, 2008
Posts: 100

function ajaxfrmconfiginst(v1,v2,v3,v4,v5)
var address="FormNoConfigInst";

var data = "term="+getValue(v1)+"&invalidlogin="+getValue(v2)+"&frmstartno="+getValue(v3)+"&receiptno="+getValue(v4)+"¤cy="+getValue(v5);
issueResultPost(address, data);

/*Ajax for form fields insert*/
function issueResultPost(address, data) {
var request = getRequestObject();
request.onreadystatechange =function()
{issueResponseText(request); };"POST", address, true);

function issueResponseText(request) {

if ((request.readyState == 4) && (request.status == 200)) {
var str=request.responseText;


function getRequestObject() {
if (window.ActiveXObject) {
return(new ActiveXObject("Microsoft.XMLHTTP"));
} else if (window.XMLHttpRequest) {
return(new XMLHttpRequest());
} else {

function getValue(id) {

try { console.log("Loading script");
} catch(e) { console = { log: function() {} }; }
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689

Use code tag when your question contains code.

read this Use Code Tags ..

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63334

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP. For more information, please read this.

This post has been moved to a more appropriate forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63334

Also what's your question? All you've done is to post unreadable code.
Himanshu Kansal
Ranch Hand

Joined: Jul 05, 2009
Posts: 257
After skimming through your code, which actually required a lot of effort, I could only see that you are using ajax already and that to pretty fine. If this is your code then please rephrase the question, else please quote the source and place your question clearly

Experience and talent are independent of age
I agree. Here's the link:
subject: how to use ajax
It's not a secret anymore!