Questions tagged as 'javascript'

3
answers

Separate a url with Javascript and save it in a variable

I would like to save the url in a variable, the url comes in this way https://www.midominio.com/sites/document/indice1.txt I just need https://www.midominio.com/sites/document/ thanks.     
asked by 04.10.2016 / 21:26
2
answers

Keep a fixed label on select

I have a SELECT that when displayed and select the option, sends the value to an INPUT text. The issue is that I want the SELECT button to not change the name, that is, to always type TYPE: <div class="input-group-btn"> <select type="...
asked by 09.03.2018 / 16:21
2
answers

Select shows blank Background of your selected options

I have a Select which contains 3 colors as options, but when I select an option it does not show the background color, it only shows the text: <html> <head> <meta http-equiv="Content-Type" content="tex...
asked by 15.03.2018 / 16:53
5
answers

Restart while while JavaScript

I have been testing some things in JavaScript and, since I am learning, in practice I have encountered an error executing a cycle while() that I describe next. What I need is to make a prompt() that asks for a password to...
asked by 08.08.2018 / 06:10
4
answers

Copy the values of an array into a variable

How can I change a value ONLY of arreglo2 without changing arr ? var arr = [0, 1, 2, 3, 4]; var arreglo2 = arr; arreglo2[1] = "Hola"; console.log(arr); console.log(arreglo2); (In both the position 1 was modifie...
asked by 21.03.2018 / 19:07
2
answers

Google maps does not work on my website but on fiddle

I have a fiddle that works perfectly, now I want to upload it to my server, to I have separated it into 2 files, map.html and map.js . map.html I put a temporary key that I created (I do not know if that's the problem) I'v...
asked by 25.07.2016 / 20:15
3
answers

What is the meaning of "-" when it is next to a variable or parameter

I was reading the book of Eloquent Javascript, and in the exercises of Functions of recursion it makes you solve a problem and this is the solution they give in the book function isEven(n) { if (n == 0) return true; else if (n == 1)...
asked by 27.07.2016 / 15:32
2
answers

EmberJS: Use ESLint instead of JSHint

I'm using EmberJS v1.13 and currently running ember test uses JSHint to detect possible errors in the code and I need to tell Ember to use ESLint instead. Any ideas on what I should do?     
asked by 18.12.2015 / 22:38
1
answer

It does not let me select the checks associated with radio 1, however when there is nothing selected if it leaves me

<head> <script> function disable() { if (document.getElementById("R1").checked) { document.getElementById("cami").disabled=true; document.getElementById("pack...
asked by 05.12.2018 / 13:49
2
answers

Error replace () Javascript Jquery

I'm doing a function in Jquery and Javascript in which I have to pass a parameter through the url. This parameter contains the characters / and + , so I have to replace them so that there are no problems in the url....
asked by 29.06.2016 / 12:28