Questions tagged as 'javascript'

4
answers

eliminate successive equal chains

My code eliminates the successive chains when there are 2 equal chains but when there is more, it does not eliminate. Example with 2 successive chains equal "a", "a" var string = ["a", "a", "b", "c", "d", "e", "f", "g"]; elimin...
asked by 16.01.2018 / 21:01
2
answers

Validators within a denied JavaScript condition

I have a problem with a condition that I perform in javascript, I send to call id's with a denied condition, if all the inputs are different to empty, then I save the data in the database, however there are some cases in which I apply regular ex...
asked by 01.09.2016 / 06:30
2
answers

Problems showing data from an array in a select in Angularjs

I have the following array in: var GruposSanguineos = [ { Nombre: '0 RH(+)', Valor: '0+' }, { Nombre: '0 RH(-)', Valor: '0-' }, { Nombre: 'A RH(+)', Valor: 'A+' }, { Nombre: 'A RH(-)', Valor: 'A-' }, { Nom...
asked by 24.08.2016 / 15:45
2
answers

How to avoid sending a form

I want to know how to avoid sending a form. What I need is that if the sum of number2 with number3 is equal to number1 the form is sent but if it is different that the sending of the form stops avoiding the values in the input tags are deleted....
asked by 13.09.2017 / 00:56
2
answers

how to set a maximum response time in ajax?

I have a call through ajax that returns me an answer, what I want to do is, for example there are times when the answer takes a long time and in these cases I would like to put a message that says something like that your request took longer tha...
asked by 19.09.2017 / 13:12
3
answers

Browse JavaScript fix elements as in C ++ 11

In javascript you can traverse an array like it does in other languages like C ++ 11, for example like this: for(auto i : array) { // imprimir i } With javascript I have been able to do this: for(var i in array) { // imprimir array[...
asked by 12.12.2017 / 21:44
2
answers

Browse JSON JavaScript NodeJS

Good morning, I modify the question. How can I navigate through this JSON in NODEJS JavaScript: { "subscriptionId" : "5a268a598dc68904bbc7b3cf", "originator" : "localhost", "contextResponses" : [ { "contextElement" : {...
asked by 05.12.2017 / 13:48
1
answer

I want to add js code to a page [closed]

I am trying to add javascript element to my web page, but the thing is I do not want to add it in html , I want to add it from javascript / em>. I had tried something like document.write ,  but this replaces the whole page so what...
asked by 05.10.2017 / 15:06
1
answer

How can I reduce this code? (JavaScript)

I am trying to generate links automatically for one chapter to another (in different .html) I got this code but I think it is too long as it could redurct / improve it <html> <body> <div id="caps"> </div> <s...
asked by 26.06.2018 / 10:52
1
answer

Text in javascript with 'script / script'

I am adding a script in html and within a string of the style. I do this because we show a piece of code on our platform that we want the user to be able to copy by clicking on a copy button: <script> function copyCode(){...
asked by 15.06.2018 / 10:04