Questions tagged as 'javascript'

3
answers

Ajax cross domain

Hello some time ago I asked this question: Paste content of another page by javascript or jquery The colleague @SneepSNinjA made the following algorithm that worked. $(document).ready(function(){ $("button").click(function(){...
asked by 17.07.2015 / 19:21
2
answers

Semicolon (;) in ECMAScript 6 is no longer needed? [duplicate]

When using ECMAScript 6 (ES6) is it no longer necessary to use a semicolon (;) at the end of each line of code?     
asked by 29.12.2016 / 18:03
4
answers

Can you reduce this script without losing functionality?

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js"></script><script>$("div#contenthead div.left span").hover(function() { $("div#contenthead div.topmenu").addClass("displayblock");}); $("div#con...
asked by 11.11.2015 / 16:41
3
answers

Template String in JavaScript

I'm having trouble making a function in JavaScript that I pass a string and an object and it fills this string with the attributes of that object, for example: var user = { nome: “danilo”, idade: 29 }; var a = “Meu nome é ${nome}, e t...
asked by 07.08.2015 / 20:37
3
answers

JS - Array of objects for array array

How do I convert an array of objects to an array of arrays in javascript? I did this, but it returns an array of objects var items1 = new Array(); $.map(objResposta, function(value,index) { teste = new Array(); items1.push(val...
asked by 19.12.2016 / 13:45
2
answers

How to populate a DropDownList from another DropDownList

I need to know how to populate a DropDownList from another DropDownList. Example: I have a DropDownList named Project that takes the information from my DB. When I select for example "Project 1" I need in my second DropDownList to load all Sub P...
asked by 23.07.2015 / 13:54
2
answers

Does using "document.open" and "document.close" make any difference?

I saw in a given response from SOEN a question about how to print iframe content. I ended up with a snippet of code where I had the following: var newWin = window.frames["printf"]; newWin.document.write('<body onload="window.print()"&g...
asked by 14.02.2017 / 13:52
4
answers

Why does my CNPJ validation pass this invalid value?

I have a problem in a JS validation, in case it does not pass any invalid CNPJ value, but when typed only 000.000.000 / 0000.00 it lets it pass normally. function ValidaCNPJ(cnpj) { var i = 0; var l = 0; var strNum = ""; var strMul =...
asked by 15.01.2015 / 17:34
1
answer

What this expression means * =

I would like to know what is the meaning of *= in both PHP and Javascript: I have a JS function and I'm converting to PHP, so it came up with *= but I have no idea what it does. In the question of function is right. I would j...
asked by 26.04.2015 / 17:48
3
answers

Footer "stuck" at the bottom of the page and responsive (variable height - using bootstrap)

I've been following similar questions here in stackoverflow and other network sites, as well as tutorials on the internet, but the vast majority of the solutions do not work as I need them, or even are incompatible with the bootstrap system....
asked by 11.05.2015 / 08:17