473,624 Members | 2,240 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 10625
> 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
1586
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 I want post that information into another ..aspx page (Page2.aspx ) . I know I can do a redirect to the second page ,but then I will have to
2
12547
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 <form action="display.aspx" method="post" target="_blank"> will submit the form data and open display.asp in a new browser
5
2115
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 button and just using the data during postback. Now, however, I've got a WebForm that I'll be working on, and it is going to collect more data than I have collected from the user in the past. I want to be able to attempt to save each part and if...
2
1731
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 to the server and then the user has to pick this file and send it up to the batchupload page. The batchupload page is not one of our page, instead it is another company's page. This is there interface to do batch processing. We have no control...
6
2077
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 each page of my project without clicking on the "save" button and he can also close the browser without saving. My customer wants the user to be informed about loss of data. If any page is left without saving data changes then on the same page a...
4
2320
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 to the first page and populate the grid on the first page with the same data on second page. Please let me know how can I do this. Thanks, Vasantha
5
2714
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 more documents to share/use during a meeting presentation. What would be the most efficient way to approach this? This is the logic I'm currently considering: Page 1: Meeting Information input with link to a document upload page (this page...
4
2255
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 complex, and I don't want to have to mess around with formatting a page using HTML within php. So basically the "action" of the HTML page sends the form to "ProcReg.php". This is the code: <?php /* Script name: ProcReg.php
5
2110
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); I don't know which namespace to use.
8
3064
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 reflect the values they anticipate committing to see hypothetical totals of columns from a set of records. These records are displaying properly on my DataGrid but I'm not sure how to get Crystal Reports 10 to use as its datasource the dataset...
0
8177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8629
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7170
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1793
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.