Questions tagged as 'javascript'

1
answer

Search Array with variable case-insensitive javascript

I need to search an array with values of type: equipamentos = [{marca: 'Nomedamarca1', modelo: 'Modelo1'}, {marca: 'Nomedamarca2', modelo: 'Modelo2'}, {marca: 'AlgumNomeComCase', modelo: 'Modelo3'},...
asked by 26.06.2018 / 17:00
1
answer

Avoid double-click and redirect to another page

Good afternoon! I made a function to prevent the user from pressing twice on the same button, this part works perfectly. global.js $('.form-disable').on('submit', function(){ var self = $(this), button = self.find('input[type="submit"], b...
asked by 22.06.2018 / 15:34
1
answer

Pass a button's id inside a while (in php) to a code in java script and start the id inside a modal

I have two buttons in a table that stays within a while (in the php code) and I have a modal outside of that while structure. My question is how can I get the individual id inside my table that is inside the loop repeat and play in the input fie...
asked by 22.06.2018 / 16:18
1
answer

Save checked checkboxes and load them when the page is reloaded

I would like checked checkboxes to be saved and loaded whenever the page is reloaded or reopened, in addition, icons will be displayed for the options. I made a function in java script that loads the functions when the page is opened, using t...
asked by 25.06.2018 / 03:38
1
answer

JS or Jquery Decrease image size and not just resize

Is there any way to reduce the size of the photo before uploading? Note: It is not just a resize, because some test I did was resized and did not decrease the size of the photo. I would like to check if the upload is of type image and Dec...
asked by 26.06.2018 / 13:19
1
answer

How to get the value of several items and change according to my if

I have a list of items (which comes from the database), I need to compare each item from one of those and if the value is 0 change the text. Below is the function I am trying to use to change the value of the item. function isFree(){ var p...
asked by 12.06.2018 / 14:25
1
answer

Javascript - Hide children from the radiobutton when you select another radio from the same group

I have a Radio Button group, some of them have other inputs as children, if they check the Input Father they should appear, if it is unchecked they should disappear. p> As in HTML below: <div style="padding-left:30px;clear:both;" cl...
asked by 26.06.2018 / 15:56
1
answer

How to make a promise linked with pure Javascript? [duplicate]

How to make a dazzling call with the native Javascript promise? I mean, I would like the sentence below to be executed one after the other and that I could know when this sequence of promises are finalized. var promise; console.log...
asked by 12.06.2018 / 20:23
1
answer

Pass two variables in the url in javascript

I have a website that has 5 different languages and when choosing a language the text of the page changes! For this I did a function: <script type="text/javascript"> function submitForm() { var thelang = document.getElementById('lang...
asked by 15.06.2018 / 14:14
1
answer

Lock website vertically

How can I prevent the content of the site from being horizontal when the user flips the phone? Would you have any solution of viewport or javaScript ?     
asked by 13.06.2018 / 15:32