Questions tagged as 'javascript'

2
answers

POST reply comes empty

service.ts: teste(user) { return this.http.post('api/home', user) } teste.component.ts: ok(user){ this.loginServ.teste(user) .subscribe(data => { let retorno = (data as any) console....
asked by 14.12.2018 / 19:53
2
answers

Does the prompt prompt change the value?

Making a simple code to calculate how much I need to reach my college average. The problem that I can not get the values from the keyboard, I use the prompt command but the result does not stay the same. I put this code and it calculates...
asked by 16.12.2018 / 05:50
1
answer

Get value in onclick js

I have the following variable: var id = doc.data().cd_id ; In JavaScript, I dynamically add html: "<button type='button' onclick='testeonclick(" + id + ")' class='btn btn-primary col-xs-12'>Editar Produto </button>" My Role...
asked by 24.10.2018 / 01:17
2
answers

Changing an image with each click

Good people, I have a problem here. I searched several times here on the website and on the internet and did not have an answer that would help me enough, I still have questions. I have a website and I have sectors "collapsible", so to illust...
asked by 25.10.2018 / 16:23
2
answers

When to use querySelector instead of getElementById?

I searched for some information on the internet about it already, including SOen, though I still have not been able to come to an exact conclusion. I should point out that the issue is not just about performance, but about unusual situations...
asked by 26.10.2018 / 16:45
2
answers

Different titles for each slideToggle

I would like to change the code I have here, so that instead of appearing "Reveal Content" on all lines of slideToggle, I can put each one with a title, for example "Revision 1", then the next "Revision 2 "and so on, in the code that I have the...
asked by 24.10.2018 / 20:01
1
answer

Get tab id - jquery

I'm trying to get the id of tab like this: var id = $('.tab-pane').find(':required:invalid').closest('.tab-pane').attr('id'); Now I'm trying this way: $('#FornecedorNovo').on('submit', function (e) { $.each($('input[dat...
asked by 25.10.2018 / 19:33
1
answer

Function to change Height with errors

184 function bannerPrincipal(){ 185 var bannerHolder = document.getElementById("banner-principal"); 186 var windowSize = window.innerHeight; 187 bannerHolder.css.height == windowSize+"px"; 188 }bannerPrincipal(); I'm trying to chan...
asked by 13.07.2017 / 22:49
2
answers

Picking up json data

I created a json with the data of a magazine that I maintain, but now I have to create a separate index by the proper category, by author, and the other fields, I was able to get the general data, but I can not filter this data into its correspo...
asked by 23.10.2018 / 22:52
1
answer

Apply 2 Google Analytics tracking IDs

I need to apply 2 Google Analytics tracking IDs on a site. I already generated the first ID. I was reading, that if I just put one above the other, it will not work. What to do? <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObjec...
asked by 06.07.2017 / 20:13