Questions tagged as 'javascript'

2
answers

Action using select

I have select <select class="select-sala" id="selecionar-aula"> <option value="">Pagina 1</option> <option value="">Pagina 2</option> </select> What I need is that whe...
asked by 17.04.2018 / 00:18
1
answer

Regular expression for numbers, commas and periods

I need to get a specific content from a string that is returned in javascript. I thought about getting his match with regular expression to get exactly the numbers, points and commas of the monetary return that has in part of the text, the pr...
asked by 16.04.2018 / 16:28
1
answer

Validate First and Last Name in JavaScript?

I have a form called 'cad' for registration, my only missing validation is the first and last name, the id, 'txtname' and 'txtsname', I need a function that validates them as follows: can only have letters, no symbols, points and numbers, only l...
asked by 19.05.2018 / 06:33
2
answers

Tag change with javascript

I want to make the p tag be replaced by the img in the hover, already bringing an image that I have in the directory. Is it possible to do or have to do something like that? If possible, in the same function. Code: $(funct...
asked by 19.05.2018 / 14:56
2
answers

Regex or Replace in Jquery

How do I change a string by adding new content? Example: <div><span id="number">1195555666<span><div> <script>var newNumber = $(#number).replace('(11)95555-6666')</script> console.log(newNumber); But...
asked by 20.05.2018 / 15:46
2
answers

JS - Multiply and Show in text

Hello, I'd like to create a code that does a multiplication of what the Client inserts into the Input text field. This multiplication would be ... Valor de taxa = 0.8; Valor do Cliente = "O valor inserido" Valor do Cliente * Valor de ta...
asked by 20.05.2018 / 17:05
2
answers

Display content of the "title" attribute next to the option element

I have an image thumbnail set in option of select . I would like the script to automatically insert the caption, for each of these images in select , based on the attribute in> title . The example of what I've...
asked by 19.05.2018 / 23:18
2
answers

How to make the angle recognize an ng-keyup event created dynamically in the element

I'm creating a directive that should dynamically include a function in the ng-keyup angular event, I tried to do this: Directive angular.module('app').directive('validar',validar); validar.$inject = []; function validar(){ var...
asked by 23.04.2018 / 20:26
4
answers

getElementById not working

I have a JS function that calls an ajax and I pass the parameters (codigo, id_trigger, info1,..., info10) and passing info1 = document.getElementById('textTicker').value it turns a string, if I give console.log(info1) it ret...
asked by 23.04.2018 / 18:08
1
answer

Pass array of images in FormData ()

I need to add a array of images in FormData , but only the first image is passing. I know the problem is in the JS code, because when I send the form directly to the php page, it works fine. JavaScript var url = $(this).attr...
asked by 01.03.2018 / 23:35