Re: database update Combobox



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

.



Relevant Pages

  • Re: finding data
    ... My question is how do I set up this database so when you open iti you ... In form design view make sure the Toolbox wizard is enabled (magic wand ... This will be the third choice in the first page of the ComboBox ... Rick Brandt, Microsoft Access MVP ...
    (microsoft.public.access.tablesdbdesign)
  • RE: Working Hours database
    ... My current database stores total hours on a weekly basis (as opposed to every ... SubdeptID ... an employee can have more than one reason to be absent so ... Workstat (combobox) ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Searching Through ComboBoxes
    ... The name of the combobox is PARID. ... combo boxes are linked to a table which is named Project_Inventory. ... ' This is where you add the code to create the resultset ... Don't forget to add code to close the database object db and the ...
    (microsoft.public.access.formscoding)
  • Re: How to populate text fields based on drop down lists selection
    ... My book's sample database also deals with authors and applications just ... I've got a combobox that pulls AuthorID, ... insert SPROC so I can add rows to the database. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Combo Box
    ... > other records in my database shows Mr also. ... >>If you are saying that you make a selection in the ... >>record you look at then the ComboBox is NOT bound. ... >>I don't check the Email account attached ...
    (microsoft.public.access.gettingstarted)