loisoft / jquery-watermark

Automatically exported from code.google.com/p/jquery-watermark
0 stars 0 forks source link

Set focus to watermarked textbox on button click #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi 
Just I was trying for watermark demo using the "Watermark plugin for jQuery
Version 3.0.6".
I am trying to integarte watermark for my asp.net textbox.
I have added the required script to add the water mark for my textbox, even 
watermark is applying properly.
When I tried to focus the watermarked text on click of the button,watermark 
text is not disappearing,Insted text is appending to the watermark text.

Please find the attched HTML sourec of the aspx page.

Note: To reproduce just cahnge the path of the Jquery and watermark script 
files.

Thanks in advance
Prabhakar

Original issue reported on code.google.com by prabhaka...@gmail.com on 26 Oct 2010 at 12:08

GoogleCodeExporter commented 8 years ago
You are using a third-party JavaScript function to set the focus to the text 
box, rather than simply focusing it directly.

Instead of using WebForm_AutoFocus('MyTextBox2'); at the bottom of your page, 
use:

$("#MyTextBox2").focus();

Original comment by t...@speednet.biz on 3 Dec 2010 at 3:57