Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
In a website I didn't build, I want to put a value in an HTML input field element with JavaScript and to also use it as-putted. I can put it with the browser console this way: document.querySelec...
#4: Post edited
I want to put a value in an HTML input field element with JavaScript and to also use it as-putted.- I can put it with the browser console this way:
- ```js
- document.querySelector("#example").value = "X";
- ```
- But, the value isn't effective (isn't recognized by the form) unless actually typed with the keyboard or pasted.
- What may cause that problem?
- In a website I didn't build, I want to put a value in an HTML input field element with JavaScript and to also use it as-putted.
- I can put it with the browser console this way:
- ```js
- document.querySelector("#example").value = "X";
- ```
- But, the value isn't effective (isn't recognized by the form) unless actually typed with the keyboard or pasted.
- What may cause that problem?
#3: Post edited
- I want to put a value in an HTML input field element with JavaScript and to also use it as-putted.
- I can put it with the browser console this way:
- ```js
- document.querySelector("#example").value = "X";
- ```
- But, the value isn't effective (isn't recognized by the form) unless actually typed with the keyboard or pasted.
What may cause such a problem and what are plausible options to deal with it?
- I want to put a value in an HTML input field element with JavaScript and to also use it as-putted.
- I can put it with the browser console this way:
- ```js
- document.querySelector("#example").value = "X";
- ```
- But, the value isn't effective (isn't recognized by the form) unless actually typed with the keyboard or pasted.
- What may cause that problem?
#1: Initial revision
Why would a form value inserted with value property won't be effective?
I want to put a value in an HTML input field element with JavaScript and to also use it as-putted. I can put it with the browser console this way: ```js document.querySelector("#example").value = "X"; ``` But, the value isn't effective (isn't recognized by the form) unless actually typed with the keyboard or pasted. What may cause such a problem and what are plausible options to deal with it?