Questions tagged as 'javascript'

3
answers

Can you prevent one of the attributes of an object from being serialized in Javascript?

Is there any way to prevent one of the attributes of an object from being serialized? Take the following example as an example. If I do not want propriedade2 to be serialized, how could I implement this? var obj = { propriedad...
asked by 29.09.2017 / 21:31
1
answer

How to link models (with association), forms and grids in ExtJS 4?

I'm using ExtJS 4.2 in a project and I'm having problems involving model associations and how to link them to forms and grids. I'll illustrate with an example. I have 3 classes and 1 json, as below: User Ext.define('Usuario', { ext...
asked by 17.12.2013 / 18:41
1
answer

How to freeze frozen thread?

Studying about JS: Javascript - Thread, Asynchronous, Ticks Asynchronous programming does it work in JavaScript?    There is only one thread to run your code, so you should avoid this code from blocking the thread as much as possibl...
asked by 27.11.2015 / 00:48
4
answers

Format Brazilian currency in JavaScript

I have the following variable: var atual = 600000.00 ; Here we have the value six hundred thousand in the American standard, I would like it when I printed it on the screen like this: 600.000,00 I'm using jquery in the project if it he...
asked by 03.02.2017 / 15:11
2
answers

Simulate key events in javascript

I'm looking for a way to simulate keypress of% via javascript to create an exclamation point shift + 1 for a series of tests (specs) in a framework in which I'm involved. I have used a framework (Syn) , jsFiddle example , but...
asked by 13.04.2014 / 22:51
4
answers

How does jQuery make the parameters to be dynamic?

I noticed that in jQuery, parameters can often be passed or omitted, and regardless of order, they work as expected. What I mean is this. See the following codes below: $('#x').fadeOut(function(){ alert('complete') }); $('#x').fadeOut(40...
asked by 18.10.2015 / 23:59
3
answers

Why (1 == true) is "true" and (2 == true) is "false"?

I was explaining to a friend of mine the difference between == and === in PHP and wanted to demonstrate this through the javascript console. I was going to show him that in PHP, the following sentences would return TRUE w...
asked by 28.07.2015 / 17:01
4
answers

What does the "do" function do in JavaScript?

I searched a lot and could not find the functionality of do in JavaScript. Example: function b(a, b) { do a = a[b]; while (a && 1 !== a.nodeType); return a }     
asked by 07.07.2017 / 15:42
4
answers

How to select a text snippet in a String?

I'm creating a text file and using some delimiters ( <# and #> ) I need to select what's inside the <# texto.delimitado #> delimiter. Using the split() JavaScript function. What would be the best regular...
asked by 30.12.2013 / 04:43
2
answers

Enter key do not give submit

How to make the enter key not give submit on a form? Example: in an input pressing enter nothing happens. Today, if you press enter , the browser gives submit , and you clicked the submit button.     
asked by 14.12.2015 / 20:24