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 February 20th, 2011, 08:03 PM
Authorized User
 
Join Date: Feb 2011
Posts: 37
Thanks: 8
Thanked 0 Times in 0 Posts
Default jQuery Watermark Plugin

Hi

Wondering if anyone has been experimenting with jQuery on completion of the tutorials in Chapter 11? I've been playing about because I want to assign a watermark using the jQuery plugin to a textbox I have in my form as shown below.

The code seems to match the code from the book exercises but when it loads in the browser at runtime the Tooltip text does in fact display but not within the textbox as grey out text but alongside the textbox as normal black text.

Has anyone else experienced a similar problem when using the jQuery plugin?


Code:
<asp:TextBox ID="CriteriaTextBox" runat="server" ToolTip="Please enter the User Name" CssClass="InputBox"></asp:TextBox>
Code:
<script src="../Scripts/jquery.updnWatermark.js" type="text/javascript"></script>

<script type="text/javascript">
    $(function () {
        $.updnWatermark.attachAll({ cssClass: 'Watermark' });
    });
</script>
Code:
.Watermark
{
    position: relative;
    width: 0;
    height:1.25em;
    vertical-align: top;
}
.Watermark label
{
    position: absolute;
    left: 0;
    top: 2px;
    white-space: nowrap;
    color: #999;
    padding-left: 4px;
    height: 1.25em;
    vertical-align: middle;
}
.InputBox
{
    width: 300px;
}
Reply With Quote
  #2 (permalink)  
Old February 21st, 2011, 03:43 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

When I copy and paste your code into a new file, this seems to work fine for me.

Maybe there's other code in your site that messes up the design?

I attached my demo page so you can see how it's set up.

Cheers,

Imar
Attached Files
File Type: txt Watermark.txt (1.2 KB, 17 views)
__________________
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
The Following User Says Thank You to Imar For This Useful Post:
Phil Critchley (February 21st, 2011)
  #3 (permalink)  
Old November 22nd, 2011, 03:45 PM
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

Hi Imar,
Greetings!!

I am wrapping textboxes in ul element. I can see that watermark text is hidden beneath the textbox when position attribute is set to relative in ul element, but as soon as I remove this attribute the watermark appears on the textbox.
What is problem with relative value? Is there any fix to it as I want to use relative value for the position attribute.

Code:
ul input[type="text"], ul input[type="password"]
        {

            width:300px;

            padding:5px;

            position:relative;
}
the web page code is
Code:
<ul><li><input type="text" title="enter value" /></li></ul>
Reply With Quote
  #4 (permalink)  
Old November 22nd, 2011, 04:32 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Are you using the plugin for the watermarks? If so, it may not support this positioning option. Not sure though.... Maybe the plugin page has more info?

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
  #5 (permalink)  
Old November 23rd, 2011, 01:27 PM
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

Hi Imar,
Link http://plugins.jquery.com/project/updnWatermark does not exist anymore.

Even I searched plugin on jquery site but got nothing.
Kindly update the link if you get the new one.

Thanks
Reply With Quote
  #6 (permalink)  
Old November 23rd, 2011, 01:30 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

http://updatepanel.net/?p=579

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
  #7 (permalink)  
Old November 23rd, 2011, 03:00 PM
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

thanks Imar for link...
Reply With Quote
  #8 (permalink)  
Old November 23rd, 2011, 03:33 PM
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Default

Where we can download vsdoc file of jquery from?
thanks...
Reply With Quote
  #9 (permalink)  
Old November 23rd, 2011, 04:13 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

From Google? https://www.google.com/#sclient=psy-...=1050&bih=1262

Also, I think you can get it through NuGet.....
__________________
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
  #10 (permalink)  
Old November 24th, 2011, 11:15 AM
Friend of Wrox
Points: 1,469, Level: 15
Points: 1,469, Level: 15 Points: 1,469, Level: 15 Points: 1,469, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
Smile

Hi Imar,
The maximum version I could get is 1.5 of vsdoc. Isn't there vsdoc for 1.7 version? or 1.4.1 vsdoc is compatible with jquery 1.7 version?
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
Chp 7 Caption & Watermark p202 aformoftruth BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 4 March 4th, 2010 06:21 AM
Servoy Plugin elizas MySQL 1 January 27th, 2010 09:23 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
getdatasource in plugin ashok BOOK: Professional Jakarta Struts 0 July 1st, 2004 03:32 AM



All times are GMT -4. The time now is 11:06 PM.


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