Questions tagged as 'javascript'

3
answers

Is the "async" attribute used to execute dynamically loaded scripts? (AJAX) [closed]

I have a problem with content loaded in AJAX . It is as follows : When I load scripts via ajax, I do not have " onload " or similar events to be able to trigger the loaded script. Does the async attribute on the script...
asked by 10.06.2017 / 09:57
3
answers

Making a div reappear

In the yellow div ( id="conteudo" ) there is the pink div ( id="conteudo-interno" ) and an image. The button causes the yellow div to be cleared, but I want it to disappear, except for the pink div ( conteudo-interno ) Is ther...
asked by 22.09.2017 / 16:33
2
answers

Check if value exists in array of objects

I have an array that is as follows [ { "Param": 1, "Valor": 68 }, { "Param" 1, "Valor": 79 }, { "Param": 2, "Valor": 165 } ] I would like to know how to check if the number (in Valor ) exists in t...
asked by 21.07.2017 / 19:49
2
answers

Character block with exception field email

I am using this code to block special characters, but it is also blocking in the email field. How do I solve it? or as I allow. " e _ $(function(){ var regex = new RegExp('[^ 0-9a-zA-Zàèìòùáéíóúâêîôûãõ\b-]', 'g'); // repare a flag "g" de glo...
asked by 13.09.2017 / 14:23
2
answers

Json parse array

I have the following answer { "users":[ { "id":1, "Name":"Rafael", "label":"teste" }, { "id":2, "Name":"Carlos", "label":"teste" }...
asked by 11.04.2017 / 16:02
2
answers

How to make a slider range of time with jquery?

How do I make a slider range of hours from 00:00 to 23:59 with jquery ui? Code: $("#hora-range").slider({ range: true, min: 0000, max: 2359, values: [0000, 2359], slide: function(event, ui) { $(".min-hora-label").htm...
asked by 30.05.2017 / 19:04
2
answers

Javascript - How to add to all the href="" of a div a domain "http://site.com"

   I have a system that looks for product suggestions via ajax. It pulls the information, however this information comes from an external site, and it has the local URL. href="#"># , I need to have it inserted in all href="" , the d...
asked by 12.08.2016 / 05:29
2
answers

How to be less repetitive in my JavaScript codes?

My code looks big and clumsy, is there a way to make it smaller? Something like "easier to write", or less? Here's my example, as you can see, I need to repeat this block 5 times , to display only one button at a time and its <div>...
asked by 09.08.2016 / 02:31
2
answers

Change field from hidden to text with javascript

All good personal? So, I have a field of type hidden, I need to assign a value to it and change it from hidden to text after the calculation function calc(){ var myVar = formCalc.myCamp.value; document.getElementById("calcFeito").va...
asked by 18.07.2016 / 07:06
1
answer

Creating Page With Similar Objective To JSfiddle Site

Since I had to open the favorite text editor to create HTML page to perform CSS and JScript tests, I decided to create a personal page based on some aspects of third-party sites like "Jsfiddle", a very simple code, I'm not proud of him. I just d...
asked by 26.07.2016 / 18:11