Click to See Complete Forum and Search --> : submission problem


somsahi
08-22-2006, 12:49 PM
Hi I have a dropdown list of regions like abc,def,ghi,jkl

to submit those regions I am using follwing function using onchange event.
problem-when user changes the value result comes.But In dropdown when user want result for current visible value no results(obviously because same value is used which was before clicking on dropdown).

Now I wanna modify this function using if else like conditiion that if onchange happens value will be submitted else whatever value visible in jsp should be submitted.regionform where getter and setter property is set for form.
<script language="javascript">
function submitRegion()
{
document.regionForm.submit();
}
</script>

ahk2chan
08-22-2006, 01:09 PM
I don't understand your 2nd paragraph... But the simplest solution I can think of is to default to an empty option to start with. For example:

<select ... >
<option value="">Choose A Region...</option>
... your existing options
</select>

So in this way, when the page first get loaded, it will be pointing to an empty option, and the user must select one...

somsahi
08-22-2006, 03:01 PM
here is the point I can not use that due to some other reason

(becuase there is a link where I am using the current visible state.so if i use select then that link will give error
.Otherwise your suggested solution was perfect

ahk2chan
08-22-2006, 03:47 PM
I see. Could you please explain a little bit more about what you need to do? Thanks!