p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=554)
-   -   Watermark not working (http://p2p.wrox.com/showthread.php?t=84726)

floridaguy August 15th, 2011 09:58 AM

Watermark not working
I can't find the code on page 387 in the downloaded samples. Ch 11 Try it out step 3

The water mark won't work for me.

<style type="text/css">
width: 100%;
height: 31px;
margin-left: 40px;
font-style: italic;
color: Gray;

<script type="text/javascript">
$(':input[type-text], textarea').each
var newText = 'Please enter your ' +
$(this).parent().prev().text().toLowerClass().trim ();
$(this).attr('value', newText);
}).one('focus', function()
this.value = '', this.className = ''
}).addClass('Watermark').css('width', '300px');

Imar August 15th, 2011 10:10 AM

Hi there,

The code you posted below comes from my Beginning ASP.NET 4 book while you created this post in the Professional ASP.NET 4 book. But even in the Beginning book's downloadable files you won't find it, as the code is being replaced by a Watermark plugin later in Chapter 11.

That said, take a look at this:


$(this).parent().prev().text().toLowerClass().trim ();
which should be




floridaguy August 15th, 2011 10:19 AM

Sorry about posting in the wrong forum. Thanks for the great response. It partially solved the problem. I will move the thread to the correct forum.

All times are GMT -4. The time now is 05:49 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.