• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Form Data Lost

 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys !,

Hope u can help me in this. I have one form and three Div tags in my jsp page which is based on struts framework. So when I click on a button after filling the form displayed or better filling half of the form in first div tag. I am moved to second div tag and the first one is hidden. and simmilalry after clikcing button further moved to third DIV tag and other two are hidden. but finally after the third click the data has to be submitted to a Servlet but the problem I am facing is that I am not getting the data which I filled in first two DIVS and getting only the third div data. where as the same form is used for all the fields including all three divs.
The data is there as when I move back from the third page back to one or two data is restored in the forms So just wanted to know If anybody can suggest anything in this.

Thanks,
Rahul Juneja
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are all of the form fields contained inside the same form tags?
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes All the fields are in same form.

Thanks,
Rahul Juneja
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you say that the first two fields are hidden at the point that you submit do you mean 'disabled'? If so then they won't be posted as part of the form data.

To circumvent this add an onsubmit event handler to your form which enables the fields prior to posting.

Steve
 
reply
    Bookmark Topic Watch Topic
  • New Topic