I'm new to Prototype, and until now, it's been pretty straightforward. However, I'm getting a wierd value response from $F() when used with <select>. Here's some stripped down example code (live at http://www.prebeltway.org/test.html):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Strange Behavior from $F()</title> <script src='http://www.prebeltway.org/prototype.js' type='text/ javascript' language='Javascript'></script> <script src='http://www.prebeltway.org/ajax.js' type='text/ javascript' language='Javascript'></script> <link href='http://www.prebeltway.org/style.css' rel='stylesheet' type='text/css' /> </head> <body> <div class='input' id='inputdisplayphone1' style='width: 200px;'> <form action='updateDB' name='frmdisplayphone1'> <select id='selectdisplayphone1' name='selectdisplayphone1'> <option value='Yes' selected='selected'>Yes</option> <option value='No'>No</option> </select> </form> <script type='text/javascript' language='Javascript'> var displayphone1value = $F("selectdisplayphone1"); </script> <img alt=' ' class='editbutton' onclick='alert("value="+displayphone1value)' src='editbutton.jpg'/> </div> </body> </html> When you click the red button, the value of selected value should display in an alert. However, it continues to give me the value 'Yes' regardless of what I select. Any ideas? Thanks in advance! --Josh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
