Re: database update Combobox
- From: Clive_ <cliveswan@xxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 06:55:48 -0700
On 31 Oct, 12:49, derek wrote:
On 10/31/2007 at 05:49:28, Clive_ <clives...@xxxxxxxxxxx> wrote:
<td> <select name="cboWFMasPointTenth"
onChange="TestWFMasPointTenthfunction(this.value)">
<option value=<%= rs.getInt(3)%> > </option>
<option value="1">Yes</option>
<option value="0">No</option>
<option value="-1">-</option>
</td>
<td> <%= rs.getInt(1)%> </td>
<td> <%= rs.getString(2) %> </td>
</tr>
The combobox will provide the user with a list. The selected value
will be read from the
database. If they change the value this will be updated in the list.
I believe that i need a session or event listner but have not idea how
to start.
Does anyone have a simple example or could provide a better
solution???
Thanks
Clive
Are you trying to take the value the user selects in the combobox and do something with it in the database?
Sorry but i still dont understand what your question is.
You have a javascript method attached to your combobox, but i dont see the code for that, so i dont know if you are submitting
a form? executing some ajax? doing some validation? with the javascript.
If you are trying to get the selected option from the combobox, then you have to either submit the form or use ajax.
Either way you will need to get the data to the server again. I do not see any code for processing that either.- Hide quoted text -
- Show quoted text -
Hi,
I have a combobox with values 1, 0, -1.
I want the selected item to equal the value in the database.
It may be 1, then the user changes it to 0.
You can 'read' the value from the database:
<option value=<%= rs.getInt(3)%> > </option>
How do you get the value in combobox to 'synchronise' with the
database. So if the value of rs.getInt(3) is 0.
The combox would have 0 selected.
PS got code for combobox & database from Java not JS??
Thanks
Clive
.
- Follow-Ups:
- Re: database update Combobox
- From: derek
- Re: database update Combobox
- References:
- database update Combobox
- From: Clive_
- database update Combobox
- From: derek
- Re: database update Combobox
- From: Lew
- Re: database update Combobox
- From: Clive_
- Re: database update Combobox
- From: derek
- database update Combobox
- Prev by Date: Re: memory management
- Next by Date: Re: [OT]
- Previous by thread: Re: database update Combobox
- Next by thread: Re: database update Combobox
- Index(es):
Relevant Pages
|
|