Questions tagged as 'javascript'

3
answers

How to get media item with javascript or css?

Well, I have the following situation: <div class="corpo"> <div class="item"></div> <div class="item"></div> <div class="item"></div> </div> This div block is randomly generated and I...
asked by 01.03.2017 / 23:10
2
answers

Subdomain redirection based on browser language

What is the correct method of directing the navigation of a website to a specific page based on the language of the user's browser? I have a website (www.site.com) with the default language in English and I need it, when it is accessed in a b...
asked by 02.03.2017 / 15:09
1
answer

How to get javascript file content in string form?

I'm doing a program that needs to read the source code of a javascript file. I was trying to get the javascript file via XMLHttpRequest and return this.responseText , however, its value is undefined . How do I return the contents of...
asked by 07.03.2017 / 23:32
2
answers

Get the size of a textarea that was added dynamically

I create a modal box that has a textarea, when I click the Send button I need to know how many characters there are in the textarea. Trying to use JQuery to match this size did not return anything to me. How can I resolve this problem?     
asked by 09.03.2017 / 19:01
1
answer

jQuery - Using event click on parent and child div

I have two div. I'm trying to do the following. When I click on the parent div it should return the alert. But when I click on the child div nothing should happen. I tried something down, but I did not succeed. I know it did not work because...
asked by 26.08.2016 / 19:00
1
answer

Loading screen with gif in loading page html

I would like to place a loading screen with .gif on my page .html , because the page is very heavy. Please, if anyone can help me I will be very grateful. Page added to loading screen: link     
asked by 31.08.2016 / 18:03
2
answers

Call function js inside another and depending on the result stop the execution of the parent function

Well, I have a function (1) with validations in js, I would like to call it inside another function (2) js and if the function one has a result, I would like to stop the execution of function 2 For example: function validarCamposSimulador() {...
asked by 05.01.2017 / 17:27
1
answer

Give way to search for word in the text of a table?

I made several attempts with this logic : <html> <head> <script> window.onload = function(){ var filtro = document.getElementById('nome').value; var tabela = document.getElementById('lista'); filtro.onkeyup = function()...
asked by 08.01.2017 / 05:01
1
answer

Check for the existence of an element by the Value attribute?

I basically need to check if a given div exists inside a list, the structure looks like this: <div class="content" id="divCheck"> <div class="filho" value="1"></div> <div class="filho" value="2"></div> &l...
asked by 04.01.2017 / 22:36
1
answer

ArrayList repeating itself

I have an array that whenever I refresh my page, it doubles. I did some testing to see if it was not duplicating in JavaScript, but I did not find anything. This is JavaScript: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3....
asked by 07.02.2017 / 19:45