Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2010, 04:08 PM
Authorized User
 
Join Date: Jun 2010
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
Default Chapter 11 page 386,387

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
Reply With Quote
  #2 (permalink)  
Old August 30th, 2010, 04:12 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Tariq,

Take a look at this:

Code:
 
}).one('focus', funciton()
It's not funciton, but function....

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!
Reply With Quote
  #3 (permalink)  
Old August 30th, 2010, 04:19 PM
Authorized User
 
Join Date: Jun 2010
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
Default Thanks for Quick reply

That was really quick
Really appriciated Imar.

Thanks again.
will check the spelling mistake first next time.
Tariq
Reply With Quote
Reply


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
Chapter 1, page 11/12 jonzi_456 BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 7 April 21st, 2010 09:18 PM
Chapter 1, page 11 typo? tumana BOOK Beginning Linux Programming, 3rd Edition 4 August 25th, 2006 10:43 AM



All times are GMT -4. The time now is 09:50 AM.


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