Does anyone know how to have a field where you can enter letters/numbers and with press of a button, it will update all other fields. I am probably not making any sense. Let's take this site for example, that is similar to what I am looking for. On that site you can enter your Twitter username on press go, it will update all other fields for you. Anyone know the script or code to get this working? Thanks
Use javascript to get the value of the input field, and simply print the value on the screen when the button is clicked.
I don't understand what your trying to say. How do i get javascript to get the value of the input field?
The code looks a bit ugly, anyway, hopes it's helpful for you to get a clue. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>whatever</title> <script type="text/javascript"> function print() { var input = document.getElementById('yourinputfield').value; document.getElementById('youroutputfield').innerHTML = input; } </script> </head> <body> <form action="#" onsubmit="print(); return false;"> <p> <input id="yourinputfield" type="text" /> <input type="submit" value="submit" /> </p> </form> <p> <textarea rows="3" cols="50%" id="youroutputfield"></textarea> </p> </body> </html> Code (markup):