Questions tagged as 'javascript'

2
answers

Execute a Javascript function for the site link?

Example I have the link: www.meusite.com.br/index.php?subject=conteudo do assunto;message=teste de mensagem I want to call the onclick function of this button automatically: <input value="Enviar" tabindex="3" onclick="return sub...
asked by 18.09.2015 / 03:06
1
answer

Pass varialvel to modal

I have a page with a table whose code field is link that opens a modal. I need that when opening the modal, show another table, only with the data according to the value of the field (code) clicked. How do I get the value of the chosen field wit...
asked by 10.08.2015 / 20:28
1
answer

Minimum bits needed to represent a natural number

What is the most performative way of finding the minimum number of bits needed to represent a natural number (i.e., no signal) in JavaScript? Is there a way to do without using loops? The code below for example works for every integer between...
asked by 26.07.2014 / 17:29
1
answer

Good practices with XHR requests

I have the following question: When I make a request via AJAX and I want to "mount" the HTML based on data coming from a banco , it is wrong (in terms of "good practices") to already return HTML on itself requisition...
asked by 23.01.2015 / 14:20
1
answer

I can not remove an item copied from one list to another (drag and drop)

I have the following code link . My problem occurs as follows: Add a Double Steppe in the list on the right. Add a Simple Steppe in the list on the right. Add a second Double Step in the list on the right. Drag a Double Step to the...
asked by 14.01.2015 / 14:59
1
answer

How to resize thumbnails generated by Uploadfy? ASP.NET C # MVC 4

Hello, I would like to know how to resize the thumbnails generated by the jQuery Uploadfy plugins. As I show in the print below, it generates the thumbnails according to the actual size of the images, is it a good practice to only resize them in...
asked by 17.03.2014 / 15:21
1
answer

Game Table Creation

I wrote this code to organize the teams that will face in the Cup: <script> var dados = { "grupo1" : [ {"selecao" : [{"nome":"brasil"},{"resultado" : [{"a":0},{"a":4},{"a":2}]}]}, {"selecao" : [{"nome":"croacia"},{"re...
asked by 02.03.2014 / 07:48
1
answer

What is a shim?

When asked about "What is a Polyfill?" , I ran into comments and searches with the term Shim . What would a Shim be? What is the relationship of the term Shim with the term polyfill ? Shim is directly linked to Javascript, su...
asked by 05.04.2017 / 02:02
1
answer

Double Characters in Regular Expressions

I am training my javascript and am wondering how I look for repeated characters in a regular expression Example: I type aa in a textbox and, within a validation method, the method checks whether the character a, typed twice in a row, is insid...
asked by 11.05.2017 / 20:03
1
answer

Copy and Paste Javascript command [duplicate]

I need to know how to give ctrl c in a div's contents when clicking on it. In case it will have multiple divs, and it will get the contents of the div clicked. I found some things on the internet, but wanted something simple. Simply through...
asked by 27.06.2015 / 15:28