Forum

HomeHomeCoreCoreGeneralGeneralDrop Down onChange SubmitDrop Down onChange Submit
Previous
 
Next
New Post
9/8/2010 9:27 AM
 

Hi,

I have a configuration of simple grid displaying addresses. next to each address, there is a drop down box to choose the area/neighbourhood this address belongs to.

I would like to set it up that every time a drop down is changed (onChange) the new value selected will be stored into the database. Kind of inline editing.

Any ideas how to get it done?

New Post
9/9/2010 11:24 AM
 

Fire several onchange events in a row. One to set a session variable containing the record id you need to update, and a second event to actually do the record update. The example below does not do exactly what you want but you could easily adapt it to do so.

<tr style="font-family: arial; font-size: 10px; font-weight: normal; background: AliceBlue; ">

<td valign='top'><input id="hiddenClientId"
name="hiddenClientId"
value="[inccount]"
type="hidden"> [firstName] [lastName]</td>
<td valign='top'> <input id="hiddenClientName[inccount]"
name="hiddenClientname[inccount]"
value="[firstName] [lastName]"
type="hidden"> <input name = 'newHours[inccount]'
id = 'newHours[inccount]'
value='5.5'
type='text'
size='5'

onchange="checkhours(this.value,'newHours[inccount]');"
disabled=true>

New Post
9/10/2010 10:03 AM
 

Funny how the universe works. in email today I got a newsletter with this link

How To Use JavaScript To Auto-Submit Dropdowns, With No Submit Button

http://www.htmlgoodies.com/beyond/jav...

New Post
9/15/2010 9:34 AM
 

Thank You!

Previous
 
Next
HomeHomeCoreCoreGeneralGeneralDrop Down onChange SubmitDrop Down onChange Submit


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share