trooprr / jquery-watermark

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

Watermark text not removed prior to form submission in IE 7-9 #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The problem:

When submitting a form without having set any text in the textbox, the 
validation results with an error message. No problem so far. However, in IE 7-9 
the watermark text seems to be not properly removed prior to form submission 
since the actual watermark value gets validated. The result is an error message 
concerning the text length in the textbox, and not, as intended, an error 
message due to the missing text in the textbox.

What steps will reproduce the problem?

1. Add two validations to a textbox:

- Text is requiered
- String length is e.g. limited to 5

2. Add a watermark with more than 5 characters
3. Submit the form

What is the expected output? What do you see instead?

Expected output:

1. No text entered: Error message like "Please enter text" is visible.
2. Six or more characters entered: Error message like "Please enter text with 
max 5 characters".

What do I see: 

1. No text entered: Error message like "Please enter text with max 5 
characters".
2. Six or more characters entered: Error message like "Please enter text with 
max 5 characters".

What version of the product are you using? On what operating system?

jQuery 1.4.4
watermark plugin 3.1.3
IE 7,8,9

Please provide any additional information below.

Everything works fine in Firefox and Chrome. I fixed the issue by calling 
$.watermark.hideAll() when the button click event is fired.

Original issue reported on code.google.com by mathias....@googlemail.com on 2 Sep 2011 at 9:15

GoogleCodeExporter commented 8 years ago
This is not a bug.  You are most likely not putting the scripts on the page in 
the proper sequence.  Please check the main project page, scroll to the bottom, 
and read the section about using with validation plugins.

Original comment by t...@speednet.biz on 2 Sep 2011 at 1:31