Questions tagged as 'javascript'

1
answer

'Uncaught ReferenceError: floor is not defined' when trying to use floor and random to randomly pick an item from an array

I have the following array: var cartasViradas=[ 'assets/img/1.png', 'assets/img/2.png', 'assets/img/3.png', 'assets/img/4.png', 'assets/img/5.png', 'assets/img/6.png', 'assets/img/7.png', 'assets/img/8.png',...
asked by 14.10.2017 / 20:39
1
answer

Getting HTML5 Validation Errors

Is it possible to catch the event from a validation error of html5 in javascript ?. For example, the user did not enter a field, where it is marked as required , when it tries to send the form will generate an error popup of html...
asked by 24.09.2017 / 22:21
1
answer

Problem with javascript code

I have a problem with javascript, but for lack of language knowledge. Javascript: <script> function PlayerRoduzir(id) { var id; change("https://api.xxxxxx.com/tracks/" + id +".mp3"); var button1 = d...
asked by 25.09.2017 / 00:53
1
answer

Select information from a row in an HTML table

I have the following code: var clicado = null; $('.clicado').click(function(){ clicado = $(this).val(); $('#mostrarId').html(clicado); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">&l...
asked by 23.09.2017 / 20:11
1
answer

Form submitting null values

I have this little form that should send the data filled in to the page "cad_real_qm.php". However, I have a function in javascript that checks if some fields are null and if it is, will issue an alert. However, when testo giving submit in the e...
asked by 28.11.2017 / 16:26
2
answers

Update database modal

I made a code that updates the data entered by the user in the database, however, he is giving the message that the data has been updated, but does not update anything. The system works like a search. The user types the number (number and primar...
asked by 29.11.2017 / 13:21
1
answer

Doubt about creating an object

I'm new to the world of Javascript programming and I still have a lot of difficulties with things that are relatively simple, but I still can not solve them. I want to create a function that shows multiple objects on an HTML5 canvas inside the C...
asked by 25.11.2017 / 23:57
1
answer

Uncaught TypeError: Can not read property 'NAME' of undefined

I have a problem that is killing me ... I'm trying to get the API to be able to get the API data in the table, and it will give the error: Uncaught TypeError: Can not read property 'NAME' of undefined. And this "NAME" is an array that has in the...
asked by 26.10.2017 / 15:30
2
answers

Razor form field validation

I'm using MVC5 Razor to create my forms, now I have a question for the validations of the fields of this form; Example: @Html.LabelFor(m => m.Nome, "Nome:") @Html.DropDownListFor(m => m.Nome, "Nenhum" , new { @class = "form-d...
asked by 26.10.2017 / 14:36
3
answers

Call functions for ajax request inside callback

Within a function callback() of a click need to make at least 3 requests. I separated this into three functions: (func1(), func2() e func3()) and each of them makes a request ajax ($.get) returning me true or fa...
asked by 12.11.2017 / 15:11