Questions tagged as 'javascript'

2
answers

Send empty decimal input

I have the following model. It was generated from the database with entity. The two fields can be null. public partial class Items { public int id { get; set; } public Nullable<decimal> largo { get; set; } public Nullable<...
asked by 16.08.2016 / 16:50
3
answers

Javascript error: "Uncaught TypeError: isTripDay is not a function"

var tripDay = prompt('Porfavor ingrese el numero de dia en el que desea viajar'); while (!isTripDay() || !confirmDay()){ function isTripDay(){ if (tripDay >= 1){ return true; }else{ return false; } } function...
asked by 21.12.2016 / 23:55
2
answers

Hide and show a div when clicking on a radiobutton with javascript

I want to make two RadioButtons work with the same ID but I want to make that when you press deposito show the div1 and when you press ventanilla show the div2 . I can not get it, I hope you can help me do it with java...
asked by 31.03.2016 / 20:17
3
answers

get the neighboring characters that are not vowels

I want to obtain the neighboring characters that are not vowels, but it does not show me all, the code below is what I try but it does not fulfill my objective. function solve(s) { s = s.split(''); let res = ''; let array...
asked by 13.03.2018 / 21:09
2
answers

How do I get an array of numbers and letters to show separately the result of the sum of the numbers and the whole word?

The array would be the following: const array_A = ['H',1,'o',2,'l',3,'a'] and what I want to achieve is to see this '6 Hello'.     
asked by 16.10.2018 / 00:52
3
answers

Knowing if an image exists or not correctly charged

How would you know when an image exists or is loaded in the browser with javascript and Jquery , would be an example like this; This to load an alternative image in case the image does not exist, something like IMA...
asked by 09.10.2018 / 16:21
2
answers

Hide parameters in the QueryString

I have this function that I use to send parameters through QueryString: <script> function Enviar(){ var string_request; usuario = document.getElementById('Usuario').value; password = document.getElementById('Password')....
asked by 10.07.2018 / 17:21
1
answer

how to work with double quotation marks

I have the following string of a CSV file var arreglo = ['"Marcopolo b1 "', '"Marcopolo b1, Leito "','"Marcopolo b2, "'] var headers = allTextLines[0].split(/\t|,/); // this function returns: var allTextLines = ['"Marcopolo b1 "',...
asked by 31.07.2018 / 12:38
2
answers

export and use variables in NodeJS

I have the following file where the values assigned to two variables are stored; same that I export with module.exports //archivo datos.js const num1 = 12 const num2 = 22 module.exports = { uno: num1, dos: num2 } Now in a s...
asked by 01.09.2018 / 01:29
1
answer

Memoization in recursive functions, javascript

function fibo(num) { if(num == 0) { return 0; } else if(num == 1) { return 1; } else { return fibo(num-1) + fibo(num-2); } } This is my code to resolve fibonacci in javascript, but I do fibo (50) it hangs. I have been resea...
asked by 23.08.2018 / 01:08