I need the text box change event in the case when the browser automatically updates the username the password will automatically gets updated in the password field .At that time the watermark should hide .So that time the i need to call text box change event.I tried with following events onfocus focusout onblur change keyup keypress keydown
Asked
Active
Viewed 123 times
0
-
[deleted my question] – David-SkyMesh Jan 08 '14 at 04:41
-
Possible duplicate of http://stackoverflow.com/questions/4938242/browser-autofill-and-javascript-triggered-events – David-SkyMesh Jan 08 '14 at 04:42
-
make ajax call on onblur() function – Deepu Sasidharan Jan 08 '14 at 04:43
-
it didnt works i already mentioned the event didnt tiggered – selva Jan 08 '14 at 05:05
1 Answers
0
Example for Textbox change event
Syntax
$(selector).change(function)
e.g.
$(“txtbox”).change(function)
Like this
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(document).ready(function(){
$("#txtchange").change(function(){
alert ("change event occured with value: " + document.getElementById("txtchange").value);
});
});
</script>
</head>
<body>
<p>Enter some text in first field then either press Tab key or click somewhere else on page!</p>
<form id="changeform">
Enter text: <input id="txtchange" value="" type="text">
text field 2: <input id="txtchange2" type="text">
<input type="submit" value="submit now"/>
</form>
</body>
</html>

Nagaraj S
- 13,316
- 6
- 32
- 53