Questions tagged as 'javascript'

1
answer

Problems with PHP date

I'm using the following function to return the date correctly from MySQL to the Brazilian format: function FormatBR($data){ $date = date_create($data); $date = date_format($date, 'd/m/Y'); return $date; } But the return is like...
asked by 14.12.2017 / 01:25
1
answer

How to get a value in the javascript link

Hello! How can I get certain values in a link? I have a url like this: slide.html? title = Name & volume = 12 however I just want to display the volume value on an h2. My Code: $(document).ready(function(){ var html = ''; var qu...
asked by 15.12.2017 / 22:45
1
answer

Javascript (pure) - Find exact angle of triangle according to the table of trigonometric ratios

I would like to know if there is a way to find the exact angle of a triangle without depending on the table. In my program, I'm getting the value in radian and turning it into degrees, but the value does not match that of the table....
asked by 15.12.2017 / 18:16
2
answers

Ajax return a result loop

I'm doing a financial system with ajax, both revenue and expenses have "descriptions" and to edit the information of a recipe I call its information but I have to pull the descriptions tbm. But the thing is that I use append on the front end to...
asked by 16.12.2017 / 18:05
1
answer

How to focus the input of a form constantly?

I have a form and need to focus on an input again until it satisfies the required, eg: $('#text1').blur(function() { var teste = $('#text1').val().length; console.log(teste); if(teste > 5){ $('#text1').focus(); }else{...
asked by 15.12.2017 / 04:40
1
answer

Add character in an input

The person types their height (which always has three digits). I want autocomplete, example: - The person types- 200 And the software will convert to 2.00     
asked by 28.10.2017 / 07:54
1
answer

Random metatag

We use OpenGraph meta tags to further detail our Facebook site for example. <head> <meta property="og:locale" content="pt_BR"> <meta property="og:url" content="site.com/blablabla"> <meta property="og:title" content="Títu...
asked by 26.10.2017 / 17:00
2
answers

What is the correct way to send a form to a controller via AJAX?

I have a simple form, which is basically my ViewModel. I'm doing a post via AJAX passing this form, but on the server side, everything is always null. My AJAX is as follows: var formData = $('form').serialize(); $.ajax({ url: '/configuraca...
asked by 03.10.2017 / 18:14
1
answer

Effect with JavaScript

Good evening, everyone. I am writing a script in which it has the function of multiplying the value typed in inputs and give me the result that I want to know. How do I type when I type, for example: 100,00 , it gives me the value a...
asked by 05.10.2017 / 23:56
1
answer

Show the number of rows and columns Javascript

I want the user to enter the row and column quantity of a table and display its values in the table. But when typing the number of rows and columns in the prompt does not display the table and values. <!DOCTYPE html> <html> <hea...
asked by 06.10.2017 / 07:06