Questions tagged as 'javascript'

2
answers

Change of option of a select by text and no attribute

With this <select> <select id="idselect"> <option value="1" data-msg="111">Personalizado</option> </select> To change the option to <select> in jquery I have for example these options $(...
asked by 03.11.2016 / 18:01
2
answers

Background photo that moves with hover mouse

I want to make an effect like the one in this Wordpress theme: link In the section where there is as a gallery of images and says things like "on the mountains", "take a flight", "a night to remember", etc. when you hover with the mouse...
asked by 06.11.2016 / 18:13
3
answers

Calculate time between two dates: hours, minutes and seconds

I am calculating a range of days between two dates with hours, minutes and seconds as follows: function calcularDiasAusencia(fechaIni, fechaFin) { var fecha1 = new Date(fechaIni.substring(0,4),fechaIni.substring(5,7),fechaIni.substring(8,10)...
asked by 24.11.2016 / 02:31
2
answers

Fill form field with the value of another field

Very good. I know that this is a treated topic, but in my particular case I can not solve it. I have a form that sends multiple rows to a database. What I need is that when filling in one of the fields manually, an entire column of the form is f...
asked by 01.08.2017 / 16:21
1
answer

Apply CSS style to a selected radio button (checked) label

I have a problem working with CSS and HTML: using CSS properties I changed the style of the radios I am working with, but the problem I have is that they are not selected, to this I mean that the button is not selected. Believe (which is a radio...
asked by 03.07.2017 / 03:14
5
answers

Error parsing json javascript [duplicated]

I'm working with php, mysql and jquery. Where I create a json with php that brings a single data, and I'll find it with jquery ajax. If I make a console.log to my data variable brought with ajax it shows me the data like this: [{"folio": "4562...
asked by 11.10.2016 / 17:27
2
answers

How to put percentage in the center of the circle?

function circlePath(cx, cy, r, percentil) { var coordx = cx + r * Math.cos(2 * Math.PI * percentil / 100 - Math.PI / 2); var coordy = cy + r * Math.sin(2 * Math.PI * percentil / 100 - Math.PI / 2); var modif = percentil >= 50 ?...
asked by 20.04.2017 / 06:00
1
answer

regular expression for textbox length

How can I make a regular expression to validate that in the textbox enter a maximum of 19 digits and a minimum of 15? What I have is this ER but I think it's wrong var expreg = /^([0-9])*{0,25}$/;     
asked by 05.07.2016 / 22:01
2
answers

Problems integrating jQuery Validator with AngularJs

I have the following directive, which I got on the web to use jQuery Validator with Angularjs app.directive('ngValidate', function () { return { require: 'form', restrict: 'A', scope: { ngValidate: '='...
asked by 20.01.2016 / 01:10
2
answers

Assign operable values to the letters of the alphabet

Like this: a=4 b=2 c=8 ... ... h=6 i=3 ... var palabra=prompt("di lo que quieras"); Input del usuario: "Hi!" I do not know how to approach this: var result= h+i?????? alert(result); And depending on the string obtained, then add these...
asked by 10.02.2016 / 20:40