Questions tagged as 'javascript'

4
answers

What is the correct way to simulate a script with a new language?

Suppose I have implemented a new language and have a functional interpreter written in javascript. Something like mylang.interpret(code_as_string) . Now I would like to create an interface where I can insert my language code into <scrip...
asked by 11.02.2014 / 20:48
4
answers

How to create a real-time notification system similar to Stack Overflow?

I am developing a Help Desk system, and would like some ideas on how to create a notification system similar to Stack Overflow itself, whenever any new support is registered. I want to use PHP, MySQL and jQuery only. Should I use window...
asked by 16.03.2014 / 20:21
1
answer

How does asynchronous programming work in JavaScript?

As far as I know, asynchronous programming in C #, for example, uses the idea of threads. The tasks to be executed can be divided into threads and can then be executed in parallel. I've always thought that JavaScript is the same and that, for ex...
asked by 24.05.2014 / 16:55
3
answers

How do I make a whole division?

Using ruby, the division of two integers is an integer division, that is, the result is an integer. For example: 3/2 => 1 If I want the result to be a decimal number, I can use a floating number instead of an integer: 3.0/2 => 1.5...
asked by 18.02.2014 / 00:00
2
answers

How to disable a text field for editing using jQuery / JavaScript?

Let's say I have a form with fields from 1 to 7. Something like: field-1 field-2 field-3 field-4 field-5 field-6 field-7 All of these fields are on a form. With Laravel, sometimes I experienced situations when I disabled a field with...
asked by 03.02.2014 / 15:13
4
answers

How to make Ajax requests, with Jquery, in different domains?

Is it possible to perform a POST-type request to a url that is not part of the domain of our application? $.ajax({ type: "POST", url: "http://www.dominioexterno.com.br/acao/", data: { var1: $('#input1').val(), var2:...
asked by 09.04.2014 / 15:09
2
answers

Self-referential global object: what is it and why does it exist?

The window object in browsers has a window property that is self-referencing : window.window === window; // true And there are still other equivalent properties in browsers: self === window; // true top === window; // true...
asked by 27.01.2014 / 02:46
2
answers

Is it possible to add scroll-only overflow behavior in a table's tbody?

You can add overflow behavior with scroll only in tbody and still do not have to set fixed sizes in pixels without having to separate the header of the columns with the body, as seen in the plugins that provide grids ? css fo...
asked by 12.09.2014 / 16:06
2
answers

How to delete a variable in JavaScript?

I'm programming in other languages, so I'm still starting with JavaScript. I was testing mgibsonbr response code to this question and found a difficulty that may be trivial. If I set var x = 0 to the global environment then how do I...
asked by 28.04.2014 / 17:14
3
answers

Javascript Analysis and Design

When working with object-oriented languages such as Java and C # we have a whole process of analysis and design available that helps us know how to design the application in order to write more cohesive, less coupled and easier to maintain codes...
asked by 28.05.2014 / 01:48