Forums
This topic is locked
Simple form question
Posted 10 Mar 2005 16:56:13
1
has voted
10 Mar 2005 16:56:13 Johan Arvidsson posted:
Hello!I have a small question about form fields. I want a user to choose between selectin a value in a drop down menu or to write a value in a text field if the value is missing in the drop down. How can I do that?
Thanks,
Johan
Replies
Replied 10 Mar 2005 20:16:38
10 Mar 2005 20:16:38 Chris Charlton replied:
It'd be a JS (JavaScript). In a way you wouldn't need JS to do anything because you can have the text field there anyway, but if you want the textfield to be disabled then activate when a user chooses "Other..." in your dropdown, then that's all JS (JavaScript).
DMXzone has some great JS articles about controling and handling forms & form objects.
<ul><li><b>JavaScripting usable forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=5252</li><li><b>JavaScript Tricks for Usable Forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=5423</li><li><b>JavaScript: Disabling and Enabling Form Fields Dynamically</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=6536</li><li><b>Scripting Forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=4936</li><li><b>Beginning JavaScript: Scripting The Select Object</b> - www.dmxzone.com/go?5065</li><li><b>CSS/ JS: Show-hide help on forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=6570</li><li><b>Real-world JavaScript: Scripting Checkboxes</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=4969</li></ul>
... to start with. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
DMXzone has some great JS articles about controling and handling forms & form objects.
<ul><li><b>JavaScripting usable forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=5252</li><li><b>JavaScript Tricks for Usable Forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=5423</li><li><b>JavaScript: Disabling and Enabling Form Fields Dynamically</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=6536</li><li><b>Scripting Forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=4936</li><li><b>Beginning JavaScript: Scripting The Select Object</b> - www.dmxzone.com/go?5065</li><li><b>CSS/ JS: Show-hide help on forms</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=6570</li><li><b>Real-world JavaScript: Scripting Checkboxes</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=4969</li></ul>
... to start with. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>