Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 15th, 2011, 09:58 AM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
Default 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">
.style1
{
width: 100%;
}
.style2
{
height: 31px;
margin-left: 40px;
}
.Watermark
{
font-style: italic;
color: Gray;
}
</style>

</asp:UpdateProgress>
<script type="text/javascript">
$(function()
{
$(':input[type-text], textarea').each
(
function()
{
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');
});
</script>
  #2 (permalink)  
Old August 15th, 2011, 10:10 AM
Imar's Avatar
Wrox Author
Points: 72,035, Level: 100
Points: 72,035, Level: 100 Points: 72,035, Level: 100 Points: 72,035, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,079
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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:

Code:
$(this).parent().prev().text().toLowerClass().trim ();
which should be
Code:
 
$(this).parent().prev().text().toLowerCase().trim();
Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
floridaguy (August 15th, 2011)
  #3 (permalink)  
Old August 15th, 2011, 10:19 AM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
Default

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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
jQuery Watermark Plugin Phil Critchley BOOK: Beginning ASP.NET 4 : in C# and VB 11 November 24th, 2011 12:06 PM
Using the Watermark vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 2 May 26th, 2011 12:17 AM
Chp 7 Caption & Watermark p202 aformoftruth BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 4 March 4th, 2010 06:21 AM
Watermark image amirmunir Crystal Reports 0 June 1st, 2006 12:09 PM
Insert text as watermark in the report? pallavijyo BOOK: Professional Crystal Reports for VS.NET 0 December 15th, 2004 10:14 AM



All times are GMT -4. The time now is 01:34 PM.


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