I need a definitive way to figure out what Javascript is modifying a form value? The best I've been able to do is:
$(function(){
console.log($("input[name=Email]").val());
});
But the value has not been changed by the point that this executes.
There's a new way to do this in Chrome and Firefox: console.trace
See here:
https://developer.mozilla.org/en-US/docs/Web/API/console.trace
In web inspector:
> console.trace()
console.trace() VM251:2
(anonymous function) VM251:2
InjectedScript._evaluateOn VM223:581
InjectedScript._evaluateAndWrap VM223:540
InjectedScript.evaluate VM223:459
undefined
So to modify the accepted answer:
$('input#myInputAbove').change(function(){
console.trace(); // No breakpoint needed anymore.
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With