This week's book giveaway is in the Cloud/Virtualization forum. We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line! See this thread for details.
To answer to your questions,
1) Please check the difference between == and ===
2) Yes, that is possible to define the button that will appear depending on what is written in the text area. All you can do is, collect dynamic data entered by the user and then assign it to button text.