DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login
Java
IT Tags

Getting value from ajax generated picklist

By: rekha singh | 31 Mar 2010 4:22 pm

Hi

I have a form where when a state is selected from a select list it generates a second list of counties appropriate for that state. The
ajax is working correctly and the second list is there but when I submit the form, the value from the second list isn't showing up
in the $_POST array. All the other values from the form are. I've checked the source on the page by highlighting the second list and
the values are all there and formatted correctly. Any idea why?

Comments

 Does your second select list have a "name" attribute with a unique value?

By: rekha singh | 31 Mar 2010

hi,

i saw your problem. i think you have to check second form properties there should be true or enable in this second form.

By: rekha singh | 31 Mar 2010

 echo "<select name=\"agent\ " >\n" ;
echo "<option value=\"Select Agent\">Select Agent</option> \n" ;

while($agentRow = mysql_fetch_ array($agentResu lts)){
$agent = $agentRow['agent' ] ;

echo "<option value=\"$agent\ ">$agent< /option>\ n" ;

}

echo "</select>\n" ;

By: rekha singh | 31 Mar 2010

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move