Questions tagged as 'javascript'

2
answers

Is there a better way to remove an element from an array in JS from the point of view of functional programming?

I was trying to remove an element from an array, and since I'm trying to learn a bit more about functional programming, I tried to change the old way I used to do this. const myArray = [ {id: 1, label: 'first'}, {id: 2, label: 'secon...
asked by 27.08.2017 / 19:51
1
answer

How to open the modal bootstrap form after a validation error Laravel 5.4

I have a modal bootstrap contact form. I have the validations where they are validating correctly. Now my question is: How do I when not to pass the validation it return the message in modal with it open. When it validates and does not pass vali...
asked by 27.08.2017 / 01:23
1
answer

How to get the ng-value of checkbox in AngularJS / Ionic

Imagine a traditional application in AngularJS <!DOCTYPE html> <html ng-app> <head> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.min.js"></script><title>...
asked by 29.08.2017 / 05:48
1
answer

Get JSON value returned from Laravel

I have the following JSON returned from a controller Laravel : { "id": 105, "tratamento_id": "24", "eim": null, "oft": "12", "codigo_produto": "CO009-1200-1200", "descricao_produto": "COMPENSADO 9X1200X1200 ", "t...
asked by 29.08.2017 / 22:28
2
answers

Changing button function via jQuery

I have some buttons that in the click of the same directs an ajax request to an external file that adds a product, however this does not matter much in this case. I manipulate these buttons, and every time the button with span buy, where...
asked by 30.08.2017 / 22:53
2
answers

How to organize JSON content [closed]

night! I need your help on the following question: I have 2 .json files, but when I open it in Notepad ++ I realize that the content is disorganized. Example: File1.json { "xxx.yyy.E-mail": "E-mail", "xxx.yyy.Senha": "Senha", "xxx.y...
asked by 10.10.2017 / 00:03
2
answers

Verify link depending on content start query

I need to load a "fake loader" when a menu link is triggered, but in this menu some links are empty <a href="javascript:;"> or <a href="#"> , I need to only identify these via javascript and not open the loader. > I ca...
asked by 05.09.2017 / 21:50
1
answer

Currency formatting [duplicate]

I have the following script in my HTML, what it does is simply check a checkbox whether or not it is selected and in case it is adding a value, my question is, how do I make this value to be formatted in currency? For example, instead of appea...
asked by 04.09.2017 / 13:15
1
answer

How to preview the title of the selected file via Javascript?

I have a code for previewing images upload in Javascript. But I would like to use with document format, so instead of showing the image that will be loaded, show only the name of the pdf / word file or an icon as well. Code I've already done:...
asked by 08.09.2017 / 16:07
1
answer

Back to the page with the modal open

I have a question. I have a form in a bootstrap modal where I have a recaptcha, the form's action is valid whether it was selected or not. I give an alert and it goes back to the previous page, but the modal is closed. Would you like to...
asked by 10.08.2017 / 21:35