It's not a secret anymore!
The moose likes HTML, CSS and JavaScript and the fly likes DropDownList value changes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "DropDownList value changes" Watch "DropDownList value changes" New topic

DropDownList value changes

Gayani Kanchana

Joined: Mar 27, 2007
Posts: 19
I am working on a web application which has 2 dropdown lists.First i chose value for the first dropdownlist and then go to second dropdownlist to select a value.When a value comes to 2nd dropdownlist value in 1st dropdownlist is set to null giving error "statement parameter 1 is not set." this value is set to null in 1st dropdownlist value process change event. i am using java netbeans 5.5. Pls help

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63343

Originally posted by Gayani Kanchana:
value in 1st dropdownlist is set to null

So what's clearing the value?

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

Joined: Nov 08, 2001
Posts: 15385
If you are posting back the page to fill in the second list, you should be reselecting the value on the server.

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1183

You might want to consider the optgroup tag within the select tag.

In IE6, it looks like -


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
I agree. Here's the link:
subject: DropDownList value changes
It's not a secret anymore!