Questions tagged as 'javascript'

1
answer

for JavaScript onload

What is the reason why I do not get to call the function showSeatStatus(i); ? window.onload = function() { //Conecta os eventos de imagem de poltrona for (var i = 0; i < tamanhoMatriz; i++) { document.getElementById("a...
asked by 19.07.2017 / 03:16
1
answer

Change text of input type = file with filename

I'm doing a project in ASP.NET MVC 5, and I need the text of my input of type 'file' to change to the name of the file when loading it. I've hidden the input so it can be triggered by clicking on label in CSS as below: HTML: <div...
asked by 19.07.2017 / 20:01
1
answer

Set a text file on the server to be read whenever you run .html (with embedded Javascript language)

I need the browser to return me pre-registered information of people and their addresses, where each has two houses on the same street. For this, I simulated a server in my pc folder, and so I created a data.txt file in the same directory as...
asked by 18.07.2017 / 06:03
1
answer

Retrieve select value with VueJS

I have a form and would like the field (which is a select) to return (selected) the previously marked value. Ex: If my selected is empty, select will show the values normally (1, 2, 3, 4). If it has value, my select will show al...
asked by 06.07.2017 / 14:50
2
answers

Applying the scroll in table keeping the header fixed

I was looking for a way to apply vertical and horizontal scroll keeping the header fixed to my table. I found in this fiddle a possible solution for this case. $('table').on('scroll', function () { $("table > *").width($("tabl...
asked by 04.07.2017 / 14:03
2
answers

Problems with balance validation

Hello, personal beauty? I have a problem in my code, I am doing a validation to check if the amount entered by the user is greater than the balance, if it is I send an error to the user. The code is as follows: $('#tx...
asked by 04.07.2017 / 14:19
1
answer

setInterval in javascript does not add

Well, I have the following javascript code and when I try to sum the strMessage it does not add, but it adds side by side to the value and so on every time it executes, what am I doing wrong? p> function main() { var s = 0; /...
asked by 17.09.2017 / 02:41
2
answers

Object orientation with jQuery / JavaScript

I have read several things about this, and I came to this conclusion, example: var classe = function () { var metodo = function () { return 0; } return { init: function () { me...
asked by 19.09.2017 / 22:27
1
answer

Problem with function for popular cities according to chosen state, function change ()

I have the following function: $(function(){ $("#estadoPaciente").change(function() { var id = $(this).val(); $.ajax({ type: "POST", url: "../controller/ajax.selectCidades.php?id="+id, da...
asked by 17.09.2017 / 06:51
1
answer

Traversing an object and its properties

Assuming I have this piece of code: let obj = { lang: { hi: 'Olá, mundo!' }, engine: { functions: { init: function () { return this.lang.hi; } } } }; console.log(obj.engine.functions.init()); How...
asked by 17.09.2017 / 15:41