This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Text area and other contents are getting cleared on changing a drop down list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Text area and other contents are getting cleared on changing a drop down list" Watch "Text area and other contents are getting cleared on changing a drop down list" New topic
Author

Text area and other contents are getting cleared on changing a drop down list

annu joseph
Greenhorn

Joined: Nov 25, 2008
Posts: 16
Hi All,
I have a jsp page in which i have to enter details of a particular mobile device. There are many text area components, combo box etc. I have got a drop down list in the page. What i need to do is , according to the selected entry in the drop down list, i need to fill a list box with the values from back-end. On changing the drop down list selection, the display list is getting populated coreectly.
But the problem is all other fields in which i have already entered data are getting cleared when i change the selection in drop down list. How to prevet the other data from getting cleared
Thanks in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

For that you will need JavaScript. This post has been moved appropriately.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Can't you fill in the values with the form submission that comes back that fills in the values?

Eric
annu joseph
Greenhorn

Joined: Nov 25, 2008
Posts: 16
No as the value that comes in the display list is something else, and the value that is getting disappeared is something else...;((
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are you submitting the entire form back to the server? Is this form element that is not retaining the value in a different form? If it is not and you are using a post/get to post back the page, than you should have the value on the server and you can set the value there.

If you are doing something else, you would have to look to see if your mobile device supports the XMLHttpRequest or use cookies

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Text area and other contents are getting cleared on changing a drop down list