This is the code i added to my
ContactForm.ascx control:
Code:
<script type="text/javascript">
$(function()
{
$(':input[type=text], textarea').each
(
function()
{
var newText = 'Please enter your ' + $(this).parent().prev().text().toLowerCase().trim();
$(this).attr('value', newText);
}).one('focus', funciton()
{
this.value = '', this.className = ''
}).addClass('Watermark').css('width', '300px');
});
</script>
exactly what is described in the book.
Compiles fine and shows in the browser no errors at all but i am not able to c any text as
Enter you name etc.
Something is obviously wrong somewhere, can someone shed some light on this please.
Thanks in advance.
Best Regards
Tariq