Questions tagged as 'javascript'

1
answer

Consume API with react

Can anyone help me with how can I consult this API? ## Cadastro '''sh $ curl --request POST \ --url https://dev.people.com.ai/mobile/api/v2/register \ --header 'content-type: application/json' \ --data '{ "email":"[email protected]", "name":...
asked by 19.09.2018 / 15:48
2
answers

Larger number of occurrences of an element in an array of objects - JavaScript

Hello, I have an array of news (objects) lista: Array<Noticia> = []; From this array I need to find out the author who most published the news. One news item has: ID | Title | Tags Author | Content . My initial idea was:...
asked by 17.09.2018 / 18:20
2
answers

How to sum numeric values of an array?

I would like to know how I can get the sum of numeric values inside an array. My case is this, I am building a sales screen, currently I have an array with the products that the user selects to sell, I am displaying them on the screen normally....
asked by 17.09.2018 / 20:34
1
answer

Retract a #div via PHP file Ajax

My problem is, I have a table that displays the information that has in the database the information entered in the index. And in the index you have the option to add a new record (Modal Ajax), in the file editaagenda.php has all forms (C...
asked by 19.09.2018 / 18:08
2
answers

Required does not work (.submit)

I created a common form and put button where I had to call a JavaScript for a certain situation and button could not be type='submit' . Then I put it as type='button' , I called the JavaScript function and to submit it...
asked by 04.01.2019 / 16:02
1
answer

Go through existing classes in a form and remove

I'm creating a form with validation using the jQuery Validation plugin, the form already has a ready structure, so I had to, the successful error classes were added together with the .form-group class. When the field is successfully valid...
asked by 31.12.2018 / 19:00
1
answer

Move up / down scroll bar slowly through [duplicate] link

Two fixed links in the corner of the page, if you move the mouse in the link to upload the scroll bar goes up slowly and the scroll down link is going down slowly, I saw this in an old page but I did not save it. code ... So using it for no...
asked by 26.08.2018 / 01:17
2
answers

How to make the hover overlap a div with overflow

I have a certain div that holds the boxes, and this div is with overflow:hidden , so I wanted to open another div with a margin negative both bottom and top , so there the suspended div did not appear of the way expecte...
asked by 24.08.2018 / 12:35
1
answer

How can I do a select validation in JavaScript to force one of the options?

Yes, I saw that there are many "LOOKING" questions but none of the answers given seemed to work. So I came here to show my doubt. Although I have tested many codes. I believe the error is either because it's old answers or that it has some versi...
asked by 18.10.2018 / 22:46
1
answer

Create PivotTable Header

I'm trying to create a dynamic array-based header that the function receives, the structure I tried, and did not work, is as follows: function createDynamicHeader(columns) { var table = document.querySelector('#table_teste');...
asked by 21.10.2018 / 00:59