473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Preserving and Displaying data after form submission

12
hi,
Im using tabs in my jsp form, so, after i add the form details in tab1 of the form and save it, i want the details to be visible in the fields though in a read-only format. But, after saving the details disapperar, how can make it stay?

Please help!
May 14 '07 #1
3 1664
sumittyagi
202 Expert 100+
hi,
Im using tabs in my jsp form, so, after i add the form details in tab1 of the form and save it, i want the details to be visible in the fields though in a read-only format. But, after saving the details disapperar, how can make it stay?

Please help!
set the values you get on servlet to attributes in request.
eg. request.setAttribute("frstTxt", request.getParameter("abcTxt"));

and on jsp you can write:
<input type="text" name="abcTxt" <% if(request.getAttribute("frstTxt")!=null){%>
readonly value="<%=request.getAttribute("frstTxt")%>" <%}%> >
May 14 '07 #2
anju07
12
set the values you get on servlet to attributes in request.
eg. request.setAttribute("frstTxt", request.getParameter("abcTxt"));

and on jsp you can write:
<input type="text" name="abcTxt" <% if(request.getAttribute("frstTxt")!=null){%>
readonly value="<%=request.getAttribute("frstTxt")%>" <%}%> >

Hi, it worked fine...it is displaying, but, i have a few fields in my form [ ex: date,time ] where i am displaying the current date and time automatically by default when a user logs in, and if desired he is allowed to change, so at any cost those values would be displayed, also, the field would never be equated to null to satisfy that condition,
How can i handle this?
May 16 '07 #3
sumittyagi
202 Expert 100+
Hi, it worked fine...it is displaying, but, i have a few fields in my form [ ex: date,time ] where i am displaying the current date and time automatically by default when a user logs in, and if desired he is allowed to change, so at any cost those values would be displayed, also, the field would never be equated to null to satisfy that condition,
How can i handle this?
You are not at all clear what you wanna do. But for prepopulating data, the way I told you will work. Now if it gets from database then set the values as attributes. Search for those attributes on the page. if not found then populate it with current date and time.
May 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: sketch | last post by:
I have one page that does 3 different things depending on $_GET: 1. It shows an index with items. 2. It shows an item with a form to submit an amount. 3. It confirms the amount. I was just...
2
by: Logical | last post by:
I have a form which houses basic inputs, as well as a few multiple select forms. I need to parse all the 'values' which are in this multiple select form (it gets manipulated dynamically client...
3
by: John Dunlop | last post by:
(Note crosspost and follow-ups to ciwah.) Nicolas Keller wrote in thread "Differences in form handling btw Mozilla and IE?": > The problem: I'm using a form that submit's (POST) its data via...
4
by: Les Juby | last post by:
Can someone please help with a suggestion as to how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to...
1
by: jeffrobbins | last post by:
Hello, I am having an issue that I haven't been able to find an answer for. Any help or pointers to information would be appreciated. I have a form, lets call it mainForm, that contains a...
6
by: Coleen | last post by:
Hi all :-) I need to redirect to multiple pages on click of a transmit button, without redisplaying each page. This redirection is to capture session variables that are created on each page and...
0
by: badboybrown | last post by:
I'm sorry to ask this, but I just can't figure it out and it's probably because it's not possible. I have a Cross-tab query that shows me the sum of items received by brand(Columns) for every...
5
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...
1
by: ColebyA | last post by:
Hi I am using ASP and HTML to process a form. The first form calls another page to process the data. When the page processes it redirects to a page confirming submission. I want to display the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
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...

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.