This topic is locked

Dropdowns

5/19/2008 5:56:45 PM
PHPRunner General questions
G
giles author

Hi,

I have a table with the fields including:

ServiceID (a numerical index)

Description
I use a dropdown linked to the ServiceID field to display the Description.
Is there a way for a javascript attached to the page to know the value of selected ServiceID when a record is edited?
Thanx,
Giles

J
Jane 5/20/2008

Giles,
here is a sample:

{literal}<script>

document.forms.editform.value_FieldName.onchange=function()

{

alert(document.forms.editform.value_FieldName.value);

}

</script>{/literal}

G
giles author 5/24/2008

Thanks Jane,
That worked a treat. For some reason I thought it was more complex than that!