Most voted "javascript-events" questions
None
Learn more…279 questions
Sort by count of
-
2
votes1
answer351
viewsIs there a Javascript function to capture mouse click?
This is my first post and I have a question. I am working on a dropdown menu that acts based on user click. This way, when clicking on one of the menu items, it descends presenting more information,…
-
2
votes0
answers37
viewsProblems validating radio groups with Javascript
I need to validate a set of radio groups so that at least one is selected by the user. If I select nothing and click the Next button, the validation seems to work. The problem is that if I then…
-
2
votes2
answers107
viewsDuplicate Jquery event in ajax call
Good afternoon guys, I’m in the following situation: I have my page called Stock.html, it contains the Jqueries events belonging to it, for now everything normal, but on this page there is a button…
-
2
votes2
answers44
viewsHow to take the value typed in an input and then add it to a Javascript URL?
I’m creating a search bar on my localhost. The intention is that when the user enters what he would like to search for, the value is added to the value of q in, for example: const solr =…
-
2
votes2
answers167
viewsReactjs Toggle onClick variable
I’m trying to come up with a logic of a toggle, which activates/disables a kind of filter, but now I need to implement a new functionality in it, it works like this, if I click on a category button,…
-
1
votes1
answer930
viewsEvent change is only triggered when changing tab or changing window
Good afternoon, everyone. I am trying to implement an autocomplete using typeahead.js. Assigns a change event to my input to make an ajax request that brings me the data that will be displayed in…
-
1
votes2
answers3098
viewsHow to fire pure javascript keydown event
How do I trigger events via ex code: keydown, keypress and then run a function when the key Enter is pressed, with pure javascript?
-
1
votes0
answers155
viewsJquery and keyboard on android and IOS
i am having difficulty capturing which character the user pressed when using smartphone with ANDROID/IPHONE. I use the jquery keyup event, but the answer is always Undefined or 229. Someone knows…
-
1
votes1
answer93
viewsJavascript - How do "IF and Else" work together with "Returns"?
I’m having a hard time understanding why sometimes, depending on where an "if" statement is inserted into a particular block of a function, it is ignored. And how to use the "retuns", when you want…
-
1
votes2
answers752
viewsHow to create an event where when the user presses the space key something happens?
For now I have only this bit of code: personagemPular.on("keyup",function(){ I wanted to trade this keyup for pressing space. And I’m also using a area text in HTML to receive keyboard entries, as I…
-
1
votes0
answers47
viewsLast Selected Menu Item
Guys, I have a tree structure, and I’m making a menu of her elements, but I need the last element selected. Someone can help me? viewModel = kendo.observable({ currentItems: [], navigation: [],…
-
1
votes3
answers1564
viewsEvent while taking the mouse out of the window
Can someone help me? I need a "light", which tells me how to make a modal appear on the screen when I take the mouse from the window, same as this site: http://www.buffetplayhouse.com.br/…
-
1
votes0
answers27
viewsTrigger event by name
i receive by a function the name of the event and the element that should trigger this event ex: callEvent('click', 'btnEvent') within this function I would like to return the element and trigger…
-
1
votes2
answers149
viewsPerform calculations between inputs
I’m using a plugin that when I click on the button + it multiplies the value. It works perfectly but the calculation is only done inside the <span id="price" class="amount"></span> and…
javascript jquery angularjs vue.js javascript-eventsasked 7 years, 10 months ago Shaolin Fantastic 546 -
1
votes0
answers26
viewsWizard Progress bar works only after page refresh
When integrating the Wizard twitter bootstrap to my application, I realized that the Progress bar works only when I update the page. I have seen in some places that this may be caused by turbolinks…
-
1
votes1
answer187
viewsHow to use Pnotify inside the angle
i have the following code and I want to use Pnotify to give notifications when the user and/or password is incorrect or/e white mandatory field. How do I? Remember that I am using Asp.net mvc and…
-
1
votes2
answers1376
viewsHow to simulate input script by Javascript (without Jquery)
I need to simulate an input as if someone was typing this includes the call of the events Keyup, Keydown, Keypress, Change etc... Javascript only even without Jquery.
-
1
votes1
answer229
viewsJavascript onclick/addeventlistener with no anonymous function
I have a problem with javascript onclick/addeventlistener, I have tried several different ways and no results were found, I wanted my click event to be equal to a function already declared and not…
javascript html web-application function javascript-eventsasked 7 years, 8 months ago Alexandre Gomes 321 -
1
votes0
answers161
viewsEvent fired twice in Jquery click
I am on time having problems with jQuery events. I have used all the best practices to stop the double event of click. Following are examples: .off() e.preventDefault(); e.stopPropagation();…
-
1
votes1
answer1174
viewsProblems loading a Datatable in Page Load with Javascript
I’m a beginner with Javascript and I’m having a problem when the Datatable of my Index is loaded. If I open a section, on my Index, and put the JS code inside it, everything works perfectly. @{…
-
1
votes1
answer69
viewsHow to create programming logic to disable a button after an action?
Context: The approval data will only be saved if there is a saved amendment, initially the button of 'salvage' should stay disabled. When saving the seam the button 'salvage' is disabled and the…
-
1
votes1
answer395
viewsDetect event click out of element
I’m learning how to make tooltips, I even played some previous questions here in the OS, but I came up with a new question; When I click off the element that has the tooltip, it could close the…
-
1
votes1
answer4837
viewsHow to validate field when losing focus?
How should I call this validation function PIS input when it loses focus? <script language="javascript" type="text/javascript"> var ftap = "3298765432"; var total = 0; var i; var resto = 0;…
-
1
votes1
answer858
viewsMove Scroll with Buttons
I need to move a horizontal scroll with buttons. I have a horizontal gallery with horizontal scroll, and I need to click the buttons in the upper right corner "next/previous" the scroll move to the…
-
1
votes2
answers2064
viewsHow to perform a function on one component and affect another component - Angular 6
I would like to know how I can through one component affect another component at angular 6. These components are not father and son. They are distinct. <app-navegacao></app-navegacao>…
typescript javascript-events angular-6 angularjs-componentsasked 6 years, 1 month ago Leonardo Vinicius 335 -
1
votes0
answers52
viewsSelected link when changing slider
Good afternoon, I’m in need of help, I’m new to Javascript, Jquery, etc. I’m developing a project and created a part with Owl Carousel 2 where Slider changes as I click on the alphabet links. When…
-
1
votes1
answer25
viewsCreate a javascript function for all application buttons
Guys, I would like to create a javascript function for all the buttons of the application, IE, every button when it is clicked it will call this function. Note: No need to put the onclick on each…
-
1
votes2
answers140
viewsHide one div while the other is visible
I wish that with this code I could start a hidden div that when I click on the button the hidden div was visible and the visible hidden with the same button. I was using the following script:…
-
1
votes0
answers35
viewsFunction savefile(); exports default to downloads folder
Good morning I would like a help, the function is exporting straight to download folder, I would like to be able to choose which folder to save the file on. I still can not see a solution for this…
javascript html5 filing-cabinet javascript-events exportasked 7 years, 5 months ago André Vieira 11 -
1
votes1
answer39
viewsNothing happens in Success, even if Json returns
The return is giving 200 Json, but nothing is excommunicated in Success. $(document).on('click', '.edit', function(){ var id = $(this).attr('id'); $('#form_result').html(''); $.ajax({…
-
1
votes1
answer66
viewsDetect jquery ondrag event
I am working with drag and drop as in the example on the jquery site: https://jqueryui.com/sortable/#connect-lists I took the same logic of the example script and applied it to an HTML page, where I…
-
1
votes1
answer423
viewsGrab mouse coordinates only when clicking on the screen
I have a problem where I need to get the mouse position only when I click on the div, that is, to get the position where the mouse was clicked inside the div. I can already get the position of the…
-
1
votes1
answer107
viewsHow to detect if the device is touch in pure javascript?
I need to add touch events only if necessary. If the device is not touch, I will only add mouse events. For this, I need to check and have a return. It is important, if possible, that the code is in…
-
1
votes1
answer678
viewsHow to open the modal bootstrap form after an Laravel 5.4 validation error
I have a contact form in modal bootstrap. I have the validations where they are validating correctly. Now my question is: How do I stop when I do not pass the validation it return the message in…
-
1
votes1
answer2185
viewsCalculator in Javascript
I’m trying to execute the first part of the code so I can continue to do it, but instead of doing the operation when you click on the "+" button, it goes straight to the else. What can I do?…
-
1
votes1
answer50
viewsEvent load inside event load?
I need the first load to solve the autoload problem of the scripts I do with php where I cannot define the order in which they will be loaded, and after that I need to load another load. You can use…
-
1
votes1
answer34
viewsSubmit form with event when checking radio buton bootflap
I am using this Responsive HTML library (http://bootflat.github.io/documentation.html) and I want to submit a form when I click on a radio button. The problem is that as there are multiple "layers"…
-
1
votes2
answers196
viewsEvent add div javascript
I have a code where there is a form and the user can choose the number of lines by clicking on buttons that are in front of the input, there is a '+' button to add a new input and '-' to remove the…
-
1
votes2
answers103
viewsWhy does the number variable return an empty string when declaring it outside a function
When the function printNumero is called, the local variable numero does what I wanted, returns the value that was inserted in the input. But the variable numero global returns an empty string, even…
-
1
votes1
answer71
viewsincrement event after a certain time
I am making an application that simulates a point marker, and I would need it to increase the next mark only after 5 minutes, I did some tests with setTimeout, but I didn’t get what I needed. The…
-
1
votes0
answers44
viewsHow to make a div increase or decrease using the touchmove?
I’m trying to make a div open as the user drags his finger down, and make it close as he drags his finger up. I searched and saw that I can capture the touch of the user on the screen with the touch…
-
1
votes0
answers15
viewstake a click event and send it to the backend
Hello I have a question wanted to know how to capture a click event and send to the back end, I thought to do with routes but I think it would not be cool, I am using Node
-
1
votes1
answer369
viewsPass the id of an element as a parameter to a function?
I have a table on my site that is automatically generating an id for each table column. I put the function call on each line. How would I pass the id of this <td> by parameter in the function…
-
1
votes2
answers11440
viewsHow to position a button anywhere on the screen, in html
I’m trying to position a button type "button" in the center of the screen. For this, I put it in a div, and applied to that div one css that arrow your position on the window. However, the button…
-
1
votes2
answers569
viewsHow to activate event by clicking anywhere on the screen?
I have a CPF validation and this "event" is activated when I click on the "validate" button". I wanted this "event" to be activated when the user clicks off the input, like he typed the CPF and…
-
1
votes1
answer108
viewsScroll action in javascript
My project is to make an animation in a logo using a css effect of the Animate.css library, the animation will occur at a certain point in the scroll of the site. I managed to do something, but…
-
1
votes1
answer277
viewsAssign NAV command on buttons - Owl.Carousel
I would like to understand how I pull the NAV command from Owl.Carousel for my buttons already stylized in a separate div. Example: Sample code: $(document).ready(function(){…
-
1
votes0
answers65
viewsScroll go straight to the next session of the page - vanilla JS
I have some sections on the site, I would like when capturing the scroll, the site went straight to the next/previous sectio. As the sections are 100vh, I take the height dimension of the device…
-
1
votes1
answer65
viewsHow to access a property of the Event element in Javascript?
I think it’s a silly question, but by my beginner knowledge I’m hitting myself a little. I am building an application in ionic3, this uses typescript, however the plugin I am working uses pure…
-
1
votes2
answers130
viewsProblems loading cascaded dropdownlist whose field is created dynamically - Asp.net MVC
I’m having trouble loading a DROPDOWNLIST that is dynamically created. When selecting a CONTACT FORM, I need the dropdownlist CONTACT TYPE to be loaded with the related options. The problem is that…