Questions tagged as 'javascript'

2
answers

Ask and store user permission to use full-screen?

Apps usually ask permission to use Smartphone features such as microphone, camera ... I wonder if you can do the same on a page so that FullScreen mode is automatically activated whenever the user opens the page, since the same gave permission fo...
asked by 03.03.2017 / 20:29
4
answers

How to put mask for Nextel in a Javascript input?

I'd like to put a mask on a <input> that expects the format Nextel : <input type="text" name="nextel"> The problem that according to site is the format of Nextel: Urban:2digitsFleet:1to7digitsID:2to5digitsEitherthe...
asked by 19.08.2016 / 16:48
1
answer

Close menu when clicking off with javascript

I have the following code //Menu Mobile var closeTab = document.getElementById("close-i"); document.querySelector(".user-list").onclick = function() { document.documentElement.classList.add("menu-ativo") }; document.documentElement.oncli...
asked by 11.10.2016 / 18:22
2
answers

With grouping a list in javascript and calculating the subtotals?

I have the following list: nomes = [ { nome: "flavio", valor: 10 }, { nome: "flavio", valor: 20 }, { nome: "fran", valor: 30 }, { nome: "fran", valor: 40 }, { nome: "Roberto", valor: 50}, { nome: "Roberto", valor: 50 } ]; How do...
asked by 05.06.2018 / 20:53
2
answers

File Upload Multiple via aJax - PHP

I'm trying to upload files via ajax and PHP with the following codes below and it's not working. I can not identify what I'm doing wrong. Page <div id="bsUpload"> <form action="" method="post" enctype="multipart/form-data">...
asked by 21.01.2015 / 19:36
3
answers

Picking value created at runtime

I'm trying to fetch a value contained in a tag ( span ) located in another domain using PHP and JavaScript. There are cases where I can get the required value but most of the value returned is null . I believe that when I give file_get_conte...
asked by 03.02.2015 / 11:41
1
answer

Is there any way to set a max-height of an element equal to the size of the window, with pure CSS?

I have a sidebar, which can contain n items in a listing. My sidebar looks something like this: In my source code, I set the following css to work: .sidebar { max-height: 400px; overflow-y: auto; } Now my question...
asked by 09.08.2016 / 22:40
1
answer

Gulp Tasks with Command Line Parameters

Work with a simple task of Gulp , created to perform a deploy in the production environment. In a simplified way, the task is: gulp.task('deploy-prod', function () { return gulp.src('dist/**') .pipe(sftp({ h...
asked by 15.06.2016 / 15:38
1
answer

replace all occurrences of a character in a string with javascript

I need to replace all occurrences of these 2 "_1" characters in a string with "_2", but Regex does not accept putting a variable there. var current_registration_number = 1; html = html.replace(/\_{current_registration_number}/g, '_'+next_regis...
asked by 27.07.2016 / 11:34
1
answer

How to implement Diffie-Hellman in JavaScript?

I'm developing a web system where users can communicate with each other privately, without even the server having access to the communication content (ie end-to-end ). For this I intend to encrypt all the messages exchanged between them in th...
asked by 09.04.2015 / 05:02