Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7398133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:50:01+00:00 2026-05-29T03:50:01+00:00

Ok i have found a solution regarding my problem. I have three text boxes

  • 0

Ok i have found a solution regarding my problem. I have three text boxes in my jsp page, when i am entering any data on first text box then control is going to get.jsp to retrieve data from database and is filling 2nd text box. But I want that data will go from first and second text boxes at a time to get.jsp to auto fill 3rd text box , but i was trying but data was going individually from either 1st or 2nd text boxes.

—-auto.jsp———-

<%@page import="java.sql.*"%>
<html>
<head>  
<script language="javascript" type="text/javascript">  
var xmlHttp  
var xmlHttp
function showState(str){ 
if (typeof XMLHttpRequest != "undefined"){
xmlHttp= new XMLHttpRequest();
   }
   else if (window.ActiveXObject){
xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");
    }
if (xmlHttp==null){
alert ("Browser does not support XMLHTTP Request")
return
} 
var url="get.jsp";//goes to get.jsp
url += "?count=" +str;
xmlHttp.onreadystatechange = stateChange;
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
}
function stateChange(){   
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){   
document.getElementById("country").innerHTML=xmlHttp.responseText;  
}   
}   
</script>  
</head>  
 <body>  
 <input id="name" type="text" name="name" onkeyup="showState(this.value)">
<br>  
<div id='country'>  
</div>  
</body> 
</html>

——–get.jsp————-

<%@page language="java" import ="java.sql.*" %>  
 <%  
 String name=request.getParameter("count");  
 String buffer="<div>";  
 //Got value from database 


while(rs.next()){
buffer=buffer+rs.getString(2)+"<br>";  
}  
buffer=buffer+"</div>";  
response.getWriter().println(buffer);  
%>

Here by request.getParameter(“count”); I am getting only one text box value, but how can i get multiple value from auto.jsp by entering data in first and second text boxes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T03:50:02+00:00Added an answer on May 29, 2026 at 3:50 am

    Just call the showState() function on your onkeyup and in the javascript function append the textbox’s value.

    var url="get.jsp";//goes to get.jsp
    url += "?count=" +document.getElementById(<first textbox's id>).value;
    url += "&secondVal="+document.getElementById(<second textbox's id>).value;
    

    and you can get the value like you did

    String secondVal=request.getParameter("secondVal"); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched for hours now and haven't found a solution for my problem.
i have this problem: ms-access could not delete and i found a potential solution
It looks like a problem which could have simple solution, but I haven't found
This is something I've pseudo-solved many times and have never quite found a solution
I have the following matching problem: I have two data.frames, one with an observation
I'm currently facing in problem using Core Data. I have two entities A and
One problem that I come across regularly and yet don't have a solution to
I've found a couple similar posts regarding this same problem, but none of the
I have a problem regarding the name resolution of a type called Action. While
I've searched the Internet and have found some good solutions for teeing STDOUT to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.