Linked Questions

711 votes
19 answers
1.1m views

I have attached an event to a text box using addEventListener. It works fine. My problem arose when I wanted to trigger the event programmatically from another function. How can I do it?
KoolKabin's user avatar
  • 17.8k
0 votes
1 answer
1k views

I have input field like below <input type="password" placeholder="Password" autocorrect="off" maxlength="30" autofocus="autofocus" animate="true" label="" rules="[object Object]"> and button ...
Gracie williams's user avatar
1 vote
2 answers
446 views

i'm trying force an event from javascript. I have a "select" element in the html and i'm forcing the value of this from javascript but this does not trigger the "change" event. How can I force the ...
Nof's user avatar
  • 13
0 votes
0 answers
320 views

I'm currently working on an autofill userscript where I require three fields to be filled automatically, I can achieve this much but the site doesn't register the fact that I've changed the fields - ...
csh's user avatar
  • 898
0 votes
0 answers
84 views

Good day I have changed the data in textarea programmatically, but the event oninput does not occur and I cannot handle the change. Is there a way to fire this event in the textarea. let nextElem = ...
Sergey's user avatar
  • 51
1 vote
0 answers
66 views

I am writing a Tampermonkey script to add more functionality to an existing website and I am trying to click on a button with the following source code: <label _ngcontent-c10="" ...
The Sage's user avatar
0 votes
0 answers
61 views

I have a checkbox: <input id="abcd" name="abcd" type="checkbox" onclick="doSomething(this, 'otherparams');"> Now, I have some other code, that could do the following: document.getElementByID("...
workwise's user avatar
  • 1,123
0 votes
0 answers
56 views

Possible Duplicate: trigger onchange event manually I have a checkbox in a form that I want to set to checked. That's easy: var checkbox = document.getElementById("mycheckbox"); checkbox.checked =...
Jason S's user avatar
  • 191k
0 votes
0 answers
31 views

Problem I'm not understanding why the input addEventListener change only execute when I physically check the radio input. The event should fire every time the radio button is checked. But it refuses ...
Monwell Partee's user avatar
1 vote
0 answers
32 views

I need to use vanilla javascript to simulate a change in a click and selection on a dropdown menu. I have a dropdown menu (it's wordpress' template selector), it looks something like this: <select ...
user18102663's user avatar
0 votes
0 answers
23 views

I'm struggling with a rather simple (or at least should be simple) issue. I'm trying to automatically fill a form online using console but after I submit, the values I set for the input fields don't ...
Fabs's user avatar
  • 11
341 votes
19 answers
665k views

I need to select an element from a drop-down menu. For example: <select id="fruits01" class="select" name="fruits"> <option value="0">Choose your fruits:</option> <option ...
Adam Bovien's user avatar
  • 3,445
259 votes
16 answers
357k views

These days we can drag & drop files into a special container and upload them with XHR 2. Many at a time. With live progress bars etc. Very cool stuff. Example here. But sometimes we don't want ...
Rudie's user avatar
  • 54.2k
105 votes
8 answers
266k views

How can I change an HTML <select>'s option with JavaScript (without any libraries like jQuery), while triggering the same events as if a user had made the change? For example using following ...
user1798933's user avatar
  • 1,081
98 votes
6 answers
216k views

I want to trigger the change event of dropdown in $(document).ready using jquery. I have a cascading dropdown for country and state in user details page. how can i set the value (which is taken from ...
Prasad's user avatar
  • 59.6k

15 30 50 per page
1
2 3 4 5
7