How to submit textbox value while changing value in dropdown list..

Hi,

Can anybody provide solution for the following scenarion with respect to search opertion.

scenario 1:

I have one dropdown list and textbox with find button, if i change anything in the dropdown list it will give me the records based on the selected value in the dropdown list.

scenarion 2:

If i type something in the search textbox and clicks on find then also it gives me the list of records based on the criteria , after that if i change something in the dropdown list with same value in the search textbox, it has consider both dropdown value and search textbox value, but in my case the search text value is coming as null in the managed bean. If i change anything in the dropdown list i am calling methon in managed bean thru actionListener attribute.

Please can anybody tell me the soln. how to submit the value in the textbox to my MBean while changing the value in the dropdown value.

Regards

Saravanan.

[980 byte] By [skumar_tvma] at [2007-11-27 10:40:41]
# 1

hi ,

<script language="javascript">

function ok ()

{

document.f.submit ();

}

</script>

<body>

<form method="get" action="second.jsp" name="f" >

<select name="search" onChange="ok()">

<option>select here </option>

<option value="1"> First </option>

<option value="2"> Second </option>

<option value="3" selected> Third </option>

</select>

</form>

<form method="get" action="second.jsp">

<input type="text" name="search">

<input type="submit" name="Submit" value="Find">

</form>

</body>

*) in this i use two form with same action and same property name for select and text,

*) only one search value will send, that based on your operations

it will help you,

drvijayy2k2a at 2007-7-28 19:08:12 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...