I have a textarea where the user posts comments with onfocus watermark message, but the watermark does not display until the user clicks inside and then outside the textarea. What's wrong with the code?
Where's the code?
Here it is. function boardbox_focus(){ function boardbox_blur(){ And then the form. <form action='profile.php' method='post' enctype='multipart/form-data'>
<form action='profile.php' method='post' enctype='multipart/form-data'>
I have tested already and is not working with the javascript. I'm looking for a similar effect like facebook's wall form. Any advice?
humm, worked for me. Use jQuery it will make your life easier This is totally on a whim, not tested at all, it's Saturday night and I've had a few....lol $(document).ready(function() { $('#boardbox').focus(function() { $(this).value() = ''; });
$('#boardbox').blur(function() { $(this).value() = 'Share something'; }); }); |