473,499 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

get data from another page

now i have a text area, when user enter their ID (10 chars),
a script will use the id to use this ID to get the user data,
and fill the form automatically. how can i use javascript to get data
from anther page (JSP generated). as follow

STEP 1: user enter id,

ID: A123456789
NAME : _________
PHONE: _________
ADDR : _________

-> after enter the id (without submit)
-> a javascript will send a request to
http://localhost/getuser?id=A123456789
-> a response will contain the data, and a script will fill the form

==>

ID: A123456789
NAME : dick
PHONE: 123456
ADDR : somewhere
Jul 20 '05 #1
1 10618
> now i have a text area, when user enter their ID (10 chars),
a script will use the id to use this ID to get the user data,
and fill the form automatically. how can i use javascript to get data
from anther page (JSP generated). as follow

STEP 1: user enter id,

ID: A123456789
NAME : _________
PHONE: _________
ADDR : _________

-> after enter the id (without submit)
-> a javascript will send a request to
http://localhost/getuser?id=A123456789
-> a response will contain the data, and a script will fill the form

==>

ID: A123456789
NAME : dick
PHONE: 123456
ADDR : somewhere


This can be done like this:

Your Page (ID field's onchange event) --submit--> jsp for data --submit-->
Your Page (again)

Your page should be a JSP, which do nothing on a GET request. The page
contains your HTML form, where the ID input field's onchange event will call
JavaScript to submit your form to the JSP page. Make a way so that JSP page
can redirect back to your page (e.g. pass URL along with ID), and in your
page when a POST request is received, retrieve posted data and fill them
into the form (via JavaScript).
KC.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1568
by: HANG LAM | last post by:
Hi, Simple question, Is there a way to post the data from one .aspx page to another page ? For example, I have a Page1.aspx that lets the user enter data like "Last Name", "First Name", but...
2
12532
by: Matt | last post by:
When we submit the form data to another page, we usually do the following: <form action="display.aspx" method="post"> will submit the form data and open display.asp in the current browser ...
5
2105
by: Rod | last post by:
I've written 2 ASP.NET applications (I've worked on one with a team and another by myself). In my ASP.NET pages, when saving data to a backend database I've done it by using the click event of a...
2
1725
by: ejs | last post by:
Please read the entire reponse, hopefully this clears up your questions. The data used that needs to go into the batchupload page comes from a server. My problem is that currently I write a file...
6
2070
by: Frank Esser | last post by:
Hallo, I've got a project with about 10 pages. On each of them the user can do data changes (mostly datagrid interactions; the datagrids are bound to datasets). The user is able to jump to...
4
2312
by: Vasantha peddireddy | last post by:
I am posting a page to another page (form post). The data grid on the second page is being populated with data. Now, on page load of the second page, I would like to send the grid data on this page...
5
2706
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
4
2248
by: Cerebral Believer | last post by:
Hi I need help! Forgive me I am a PHP newbie. I have a small script that enables me to send a form from an HTML page. I want to use the HTML formatted form because the design of my website is...
5
2104
by: Stan SR | last post by:
Hi, Some newbie questions.. :-) First, what is the namespace to use for the Cache class ? When I use this bit of code I get an error if (Cache==null) Cache.Insert("myUserList",userlist);...
8
3051
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.