trooprr / jquery-watermark

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

form submits watermark value of the textbox when FormData is used #122

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a form with a textbox and a button that will be triggered via click 
event and be triggering an ajax post

2. Textbox should have watermark applied:
   $('#myInput').watermark('something');

3. Ajax post should look like this:
var form = $("#myForm");
var formData = new FormData(form[0]);

$.ajax({
    url: form.attr('action'),
    type: 'POST',
    data: formData,
    cache: false,
    contentType: false,
    processData: false,
    success: function (data) {
        console.log('s')
    }
});

4. Observe on the server side that the value 'something' was posted upon 
clicking on the "submit" button when the textbox was empty.

What is the expected output? What do you see instead?
Empty string was supposed to be posted. Instead the value of the watermark was 
posted.

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

Original issue reported on code.google.com by dmitrief on 7 Aug 2014 at 5:58

GoogleCodeExporter commented 8 years ago
This is a coding issue on the page.  Probably has to do with the order that 
things are added in the page.

Original comment by t...@speednet.biz on 16 Aug 2014 at 5:01