Most voted "javascript-events" questions
None
Learn more…279 questions
Sort by count of
-
0
votes1
answer609
viewsChange form depending on radio button - Angular 2+
I have 3 radio Buttons, when I click on each one should appear a different fomulário. I looked for some examples, but what I found are only two options. Follow the code I have at the moment <div…
javascript angular typescript javascript-events angular-6asked 5 years, 6 months ago Guilherme Lucas 133 -
0
votes2
answers93
viewsPass a list to another page - javascript
I am wanting to pass a list that are added on a page and clicking the remove button from that list(line) go to another page(final.html). function adicionaLinha(idTabela) { var tabela =…
-
0
votes1
answer880
viewsOnchange event does not work in <select>
The event change is not working. It does not change the values (.value) that were placed in the Javascript code: function trimestre(){ var op = document.getElementById('tt').Value; if(op == 1){…
-
0
votes1
answer28
viewsCompare 2 arrays with some() or Every()
I am trying to do an exercise that compares whether the array of objects inserted in a function has any element equal to the following array: const gooUsers = [ {id: 1}, {id: 2}, {id: 3} ]; The…
-
0
votes1
answer77
viewsGet function return inside a Vuex getter
Good afternoon, I am using the vuetify bind Rules and in it a method that comes from inside a getter in a module. in bind the method returns in the best possible way, giving me error or succes and…
-
0
votes2
answers175
viewsI wonder why this Javascript code is not working (simple program)
var verificador = document.window.getElementById('input#verificador'); var nacionalidade =…
-
0
votes2
answers44
viewsHow to disable link via Javascript CONFIRM?
I am developing my first web application, being it an account manager to receive and to pay, and I found a difficulty when I came across the need for a Javascript CONFIRM to allow or block the…
-
0
votes1
answer217
viewsWhy can I cancel the onkeydown event but can’t cancel the onkeyup?
Below I have two fields using the same function. In the first field I use the onkeydown and in the second onkeyup: function eventos(e){ if(isNaN(e.key)){ e.preventDefault(); return; }…
-
0
votes2
answers373
viewsHow to change body color with onclick() from Buttons? Javascript
Hello, in the following exercise, there should be 3 Buttons, and clicking on each one, will change the body color by the color indicated on the button (using the same function for all), however my…
-
0
votes1
answer75
viewsHTML checkbox for Javascript
Hello I need to make a system that updates the total price as the items are being selected, but I don’t understand much Javascript, so I stuck to the following part: (HTML) <input type="checkbox"…
-
0
votes1
answer17
viewsReact360 - Video events cannot be added
I’m trying to understand the moment a video was completed. I tried to use video events as the documentation says, but I can’t add an event listener to my video player; when I do, I get the…
-
0
votes3
answers102
viewsJavascript performs the function without the button being clicked
Goal Replace the content of the widget <P> by a new text by clicking a button. Problem Whenever the page loads, the javascript executes the function and changes the text without the button…
-
0
votes1
answer220
viewsHow to mark an X in part of an image when firing a function in Javascript?
I mapped an image, and with the coordinates of some parts, I made sure that by clicking on a selected part, a function is executed. But I would like to know how to mark an X or make some visual…
-
0
votes1
answer1461
viewsHow to make a each in Datatable and get only the selected lines?
Good morning, I am needing to "SCAN" my Datatable and get only the selected line, could someone please help me? The action will occur after the click of any button. I have this code below where I…
-
0
votes0
answers45
viewsEnable Javascript in the ABA Console in Internet Explorer (F12) Developer Tools
Please, I’m trying to make a combobox visible within a page. I am using Internet Explorer with "F12" (Developer Tools) TAB "Console" triggering command on the command line below. For this Combobox…
-
0
votes1
answer24
viewsHow to interfere in the execution of a function called by event callback
i have a web application here that has "mouseouver" Software. The callback function called by it is being executed recursively through a setTimeOut(): /*........*/ item.addEventListener("mouseover",…
-
0
votes1
answer75
viewsWhy doesn’t my Div, raised in JS, show up?
My goal is to create a different red square every time one clicks the button. only that when one clicks on the button nothing expected happens. but one can know that the addeventlistener is working…
javascript function javascript-events create elementsasked 4 years, 8 months ago Henrique Sathler 21 -
0
votes1
answer51
viewsEvent change of select within Modal ceases to function after reopening it
I have a select inside a modal window that displays or hides an input field according to the option selected by the user. Example: if option=1, it shows the input. if option=2, it hides the input.…
-
0
votes1
answer63
viewsHow do I 'clean the results' when the user clicks ADD (activating the function Calc onclick)?
Follows the code <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />…
-
0
votes0
answers46
viewsVariable "forgets" that has been assigned to the other and function returns Undefined
function pegarBotaoClicado (botoes) { let botaoClicado botoes.forEach(botao => { botao.addEventListener("click", function (e) { botaoClicado = botao }) }) return botaoClicado } In this function I…
-
0
votes2
answers34
viewsLink Event to TAG Class exclusion
I need to make sure that by clicking the "REMOVE" button the removeChild function removes exactly the product on which the REMOVE button is linked. Currently, everything is fine but I know that in…
-
0
votes3
answers468
viewsMenu button with "toggle" event
I was trying to create a simple menu, but found that toggle function is obsolete. What would be the current alternative to create a toggle event, since I only found old answers? When you click…
-
0
votes0
answers22
viewsHide div without giving Reload
Good afternoon, I need to make a click Function without the browser being updated const show = document.querySelectorAll('.show_button') const selector = document.querySelector('.information') for…
-
0
votes1
answer48
viewsJavascript Onchange event does not work on the Smartphone browser
I created a call in a checkbox for a JS function and the desktop is working perfectly, already in the smartphone browser just doesn’t work. I have other functions that are called the same way in…
-
0
votes0
answers11
viewsHow to get audio duration inside the js loadmetadata event
I’m trying to get the duration of the audio, when I try to access the duration variable it appears indefinite, someone knows some solution, I’ve tried using asynchronous promise nothing worked.…
-
0
votes1
answer34
viewsHow to make a menu appear and hide it?
How to make the menu appear and hide? I’m not getting it. Code: let close = document.querySelector('.btn-menu') close.addEventListener('click', function() { var menu =…
-
0
votes1
answer37
viewsHow to make download routine?
Good afternoon, dear friends ! I’m starting programming in javascript! I started with something simple !! A file download routine , where the idea is, by choosing the file to download , after…
-
0
votes1
answer51
viewsSearch a String in an Input Forms
I’m trying to search a string using Javascript inside my form, but I couldn’t find a method to do it. For example, I have my form with the "email" field and would like to search the domain typed by…
-
0
votes0
answers27
viewsI can’t get the props or the api data to mount the page
Guys I’m having trouble with React with nextjs using Hooks with props , I set up a Carousel that shows several cards that use a map api to mount the cards and passes to Carousel , only when I click…
javascript-events react-hooks react-router maps-javascript-apiasked 3 years, 11 months ago Everton Costa Souza 19 -
0
votes1
answer24
viewsHow to prevent the focusout event from firing when minimizing the browser?
I’m using the focusout event to call a function when the field loses focus. The problem is that when I minimize the browser window, the event fires because it seems to lose focus. The same occurs…
-
0
votes1
answer35
viewsDo you have a problem having nested fans? | Events with Javascript
Hey guys, I made a simple to-do app with pure HTML, CSS and JS. However after q finished the project came to me a question: I have an Eventlistener to create a:…
-
0
votes1
answer23
viewsHow can I access a component and make it appear only in an Electron + Quasar window?
I would like the component to be displayed exactly in a single window, but I don’t know how to do it precisely, what I was able to do was just a small base of a whole, so far:…
-
0
votes1
answer42
viewsInsert a success message after Location.Reload()
I would like to add a successfully edited message via JS after reloading the page. The message is displayed before reloading the page and not before. Follows my code: Call AJAX: var resposta =…
-
0
votes0
answers22
viewsHow to validate and call a message only after clicking a button
I created a Javascript memory game. Everything is working almost perfectly, what I wanted was that the message of "CORRECT COMBINATION" and "INCORRECT COMBINATION", appeared only after I started the…
-
0
votes1
answer26
viewsaddeventlistener click event for after finding object type item in array - Javascript
I have the following situation: an html and inside that html a DIV, I am including via js 3 images in this div with innerHTML (like a Carousel) that change according to the button and their position…
-
0
votes1
answer39
viewsHow to use a multi-page script without giving the eventListener error in the console?
Here is a simple example to demonstrate the doubt. There are two pages and a script. I know it works by importing the script on both pages, but when I use the eventListener, it shows the error…
javascript html javascript-events events event-listenerasked 3 years, 4 months ago Glebson Santos 13 -
0
votes1
answer32
viewsRemove list item
How do I remove the item from the list that is generated after the event that creates it? I am trying to place an event that has the function of removing the item, but when I run the code it turns…
-
0
votes1
answer25
viewsHow do I click a button after the window.open() event?
I have a code where after an event onClick() is triggered opens an event window.open() where some data is sent via url to the new page, but the data is only typed in the fields, I need that after…
-
-1
votes1
answer43
viewsJavascript which Api is this?
Could you give me a direction regarding the side menu "Polka dots" where you swap the pages for it? Would you have an Api for that? And in the bicycle part there are some points with + sign, where…
-
-1
votes1
answer44
viewsfind the character quantity of an imput
1) Create a field and apply the following controls based on the events below: • In focus event change the input background to yellow. •When the field loses focus, recover its respective value and: o…
-
-1
votes1
answer96
viewsI need to change the source of a text-Area: Ex: Bold to italic, but I haven’t been able to yet. Can someone help me?
var textarea = document.querySelector(".editor"); var negrito = document.querySelector("button"); var paragrafo = document.createElement('p'); negrito.onclick = function(){…
-
-1
votes1
answer37
viewsLink select>option with Onclick of the button. Game of Old
I would like to link my select box to the function that is called on on click. I have two options: Player v s Player and CPU vs Player ... the idea is that when someone selects "Player vs Player"…
-
-1
votes1
answer30
viewsI’m making a calculator and I can’t display the results
I’m basically turning a rundown of Excel formulas into a calculator that will appear on a Landing page. I did all the logic of the calculations, but I don’t know exactly what I had to do to connect…
-
-1
votes1
answer1764
viewsJavascript countdown
I am with the following code that is to make a Countdown on top of a cookie it will be redirected, but it is not printing on the page anyone can help me var tempo = new Number(); // Tempo em…
-
-1
votes1
answer607
viewsHow to call a function within an addeventlistener?
I wonder if it is possible to call a function within a given event using addeventlistener(). I have this function, which adds a reward to the database : //Função que adiciona uma recompensa ao banco…
-
-1
votes1
answer2007
viewsHow to create a dynamic select using Javascript?
How can I call a dynamic select using javascript only? (I can’t wear jQuery) When selecting the option São Paulo (state), would show me the select with the cities of São paulo and so with Santa…
-
-1
votes1
answer61
viewsError Javascript Code When Using Keyup Event
I am using the keyup event to call a javascript function, and thus format the typed content within my input. However, it does not work properly as expected. The idea is: put only the first letter in…
-
-1
votes1
answer472
viewsAnimate a script that changes the image src
My question is this: I have in my code 2 JS functions that are called with onmouseenter and onmouseout in my HTML code, which are they: function passo1() {…
-
-1
votes1
answer104
viewsHow to get the current value of a select in a Row using the JS or Jquery click event
Inside the div 'div-documents' I add Rows dynamically to user documents (CPF, CNPJ, etc.). For the select. sel-document-type I have one two events: Click (for me to store the value of the select…
-
-1
votes2
answers133
viewsHow I search properties within a td / tr using only js
Good afternoon guys, I need to search for data from within a site (scraping) that are within a table, with and . The information I need is within td’s. Follow the code: <table width="95%"…
javascript node.js javascript-events web-scraping scrapingasked 4 years, 12 months ago arthurgehrke 19