Hey guys, I was reading over the tutorial on making a text field lose its initial value ([URL=”http://www.htmlgoodies.com/tutorials/forms/article.php/11895_3479201_2″]http://www.htmlgoodies.com/tutorials/forms/article.php/11895_3479201_2[/URL]). After reading this, I would like to add extra code to have the initial value come back if the user clicks somewhere else on the page. How do I add this? Someone told me “onblur” but I can’t seem to figure it out. Thanks!
@ryanbutlerMar 19.2008 — #Hmm..where exactly is the click event going to happen to re-initiate the value from the text box? You could grab the value from the text box using a unique ID via JavaScript and then store this in a global variable. Then on a click of a button, alert the value. Something like w/out knowing the specifics:
[CODE] <html> <head> <script type="text/javascript"> var nameInput=document.myForm.getElementById("name");
function MyValue(){ alert("The value of the input box is: " + nameInput); return false; }