Questions tagged as 'javascript'

1
answer

Error compiling project in Angular 5

I'm trying to get a JSON through POST with angular, but I get the following error. Error: Unexpected value 'AppComponent' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation. I really do not know what...
asked by 15.04.2018 / 23:51
1
answer

Ask before sending in post request

How can I ask before sending? I want to send a form, but first I want to ask if it's safe, I want to do it with the sweet library, or does it only work for ajax requests? $('.enviarClick').click(function(e) { e.preventDefault();...
asked by 15.04.2018 / 06:12
1
answer

What are the advantages of using promises in Javacript with respect to using other forms like the one I expose here?

function chuleriaClass(eL0) { this.errorStr = ""; this.then = function (eL1) { console.log("then "); eL1(this); return this; }; this.error = function (f) { if (this.errorStr != "") { f(t...
asked by 12.09.2018 / 21:11
1
answer

From a second select fill in a textbox

This is the code, I need to add a text textbox from a second select.     
asked by 12.09.2018 / 20:59
2
answers

How to get server time with node.js

The way I do it with javascript on the client side is the following function srvTime(){ try { xmlHttp = new XMLHttpRequest(); } catch (err1) { //IE try { xmlHttp = new ActiveXObject('Msxm...
asked by 21.09.2018 / 23:38
2
answers

Hide a div by showing another

I'm making a page that consists of a navigation menu with three buttons, which each open a different (left) side navigation panel (div), which is filled with buttons that each open a div with several images which are shown on the rest of the pag...
asked by 13.09.2018 / 05:50
1
answer

How can I reload a table with javascript or jQuery in ajax?

I would like to reload a DataTable after the confirmation of a modal and thus add or remove some checkboxes, but every time I do it, another table is generated on top of the other, and the Datatable is unconfigured. (I am using this after the c...
asked by 12.09.2018 / 15:46
3
answers

Convert INPUT type checkbox to INPUT type text after clicking

I have the following checkbox and I want to change it to text after clicking <input type="checkbox" name="nutriente_f1<? echo $registro6['ID_NUTRIENTE']; ?>" id="nutriente_f1-<? echo $registro6['ID_NUTRIENTE']; ?>" onclick="$nut...
asked by 12.09.2018 / 19:27
1
answer

How to unify jscript?

I have these two javascript , which I must place in several pages. How can I unify them in the same js ? if it is possible such a thing. The reason for wanting to unify it is only due to the fact that both js execute within themselves the...
asked by 12.09.2018 / 18:50
1
answer

how do I get the selected values

I have 3 types of forms, each with several inputs $("#formulario1, #formulario2, #formulario3 ").submit(function(e){ e.preventDefault(); var arreglo=[]; $this.each(function () { arreglo.push(...
asked by 03.09.2018 / 05:35