Retreiving data dynamically
|
|||
|
Rank: ? (46)
Member #: 24599 |
Hi all,
My page consists of 2 parts ,say, upper part and lower part. In the upper part, I have a form which consists of a table inside it... All the fields of the table are text boxes and each row in the table is a record of a person i.e if I have 20 rows in the table means that I can enter 20 records.... Now what I want is... In the first column of a row, when I enter the id of a particular person, some of his details(which are already stored in the database) must appear in the lower part of my page before I fill the other feilds of that row.llrly. when I go to next row and give the id in the 1st column, immediately I should get the details of that 2nd person in the lower part...............i.e as soon as the focus goes out of the first column but focus is still in some feild of the same row, Some info of regarding that row must be displayed in the lower part of my page..... Hope I am pretty clear... Can this be done using HTML JSPs and Java Script.... Plz help me do this |
||
|
|||
|
|||
|
Rank: ? (4821)
Member #: 3416 |
it's probably not reasonable to send all of the data to the browser right away and do this purely javascript, so you probably need to split the page into frames (or use an iframe for the lower part), then use javascript for the onblur event of your id fields as well as the onfocus (or whatever that one's called) events on all the fiends to actually reload the bottom page with the the id of that row. basically you'd be forming a url with the id for the row in the querystring, then you'd end up reading that with your jsp code and displaying the correct customer info. note that this means you're actually loading a page every time you switch rows (by the way, keep track of which customer is being displayed so you don't reload the same page by clicking a different field on the same row)
hope that helps!
my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
|
||
|
|||
|
|||
|
Rank: ? (46)
Member #: 24599 |
Misterhaan,
Thanks for ur reply, I tried as u said and could do something... as u said, I formed the url with the id of the customer and thought of retreiving it through jsp. But the problem I am facing is that, whenever the id in the url changes, the page should reload and in the process, all the already enterd data is also vanishing. So do we have any other way of solving this? I want the entered data to be as it is even if the page reloads.... Regards, Sweety. |
||
|
|||
|
|||
|
Rank: ? (4821)
Member #: 3416 |
you would either need to split the page into frames (which is probably the best option here) so that you aren't reloading your form, or you need to actually submit the form so that the already-entered data doesn't get lost. of course you would need to submit the form differently that way than if the user submitted the form.
my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
|
||
|
|||
|
|||
|
Rank: ? (4)
Member #: 26138 |
tis can be done using AJAX or Web 2.0.
Ya u need to depend heavily on javascript to load up all the next person info.
Webmaster Free Resources - http://www.mamakcorner.com My Blog - http://sogua.mamakcorner.com
|
||
|
Please login or register to post a reply.