Questions tagged as 'javascript'

4
answers

Show div / form when user selects an option

I would like when the person chooses one of the options of the select to appear the form as the code says. And also that when one form appeared the other would have display none. $(document).ready(function() { document.getElementById('t...
asked by 27.06.2018 / 19:06
2
answers

How to create links anchors and darken the rest of the page content less the intended section?

I want to do the following: <div id="ponto0"><a href="#ponto1"> Link </a></div> <div id="ponto1"> conteudo </div> By clicking on the href="#ponto1" link, the person will be directed to id...
asked by 17.07.2015 / 08:59
4
answers

Add minutes on time

I have a code that adds an hour or more in the hour field, I would now also add in the minutes. That is, if the number of minutes is equal to 30, add another 30 minutes. var decalage = +1 var decalage_minute = 30 var d = new Date(); //date /...
asked by 14.08.2015 / 13:09
2
answers

Form being sent twice in a row

I have this code in my JS: $('#form-sign-in').bind('submit', function(e) And in my FORM it has a Input Type Submit . When I click on it to make a simple registration, it is sending two requests. I'm using ajax ....
asked by 30.06.2015 / 20:01
2
answers

Why does not my javascript work? [closed]

Why does not it work? I am a few minutes trying to understand and follows the code: //funçao de document write var mostra = function (frase){ document.write(frase) }; // pegar elemento var pegaNome = function (){ document.getElementB...
asked by 22.06.2015 / 20:42
4
answers

Put a url in the text field and show it in a DIV next to it

How can I do this? I have a form that has some input text, I would like it when the user pastes a url of an image on the web it appears next to a div with that image. I think it would be with Ajax but I have no idea how to get started.     
asked by 13.07.2015 / 18:50
2
answers

Validate if the string has a certain character [JQUERY]

I need to input an input string such as "Jose_Silva", how do I validate if the string has "_" in it.     
asked by 16.06.2018 / 16:54
2
answers

Variable to validate 'Login' field?

I'm having trouble creating a variable to validate my Login field. For example, in my 'First Name' and 'Last Name' fields, I have this variable: var padrao = /[^a-zà-ú]/gi; In this way, if 'Name' or 'Last name' does not conform to that...
asked by 20.06.2018 / 03:27
1
answer

Validate 2 or more emails in one input

I have a registration that does email validation in the focusout event in Input. This validation works perfectly. Now there is a need to validate multiple emails within the same Input, separating by ";" and how could you handle each email at onc...
asked by 20.07.2018 / 12:27
1
answer

Calculate Price in Javascript [duplicate]

I have a table where Quantity x Price in javascript will be calculated. Following the rule of decimal places. I'm currently using the basic function, but it works only if I put whole numbers or "." separating (15.50). By separating with a c...
asked by 20.06.2018 / 20:32