Questions tagged as 'javascript'

2
answers

Is there any way to debug by the browser to stop exactly in the line that is being executed?

I got a complex code for maintenance and noticed that a table is constantly updating causing page to slow down. I would like to know if you have any browsers option (chrome preference), which allows me to stop javascript execution and go to t...
asked by 16.09.2015 / 19:29
1
answer

Get the most selected radio input with JavaScript

I'm setting up a test, I'm just having the html structure done, I wanted to know how to do which input radio is most selected. Ex: The most selected was "A", so when sending the form, the image corresponding to most letters "A" and so on with th...
asked by 12.09.2015 / 15:20
2
answers

How to read a JSON file dynamically? (ANGULAR 2)

For example, when I start, I want my program to load all previously stored messages into a JSON (message.json) file. ngOnInit() { this.emissor = 'Victor'; this._http.get<PreparacaoDeMensagem[]>("../assets/db/mensagem.json") .subscribe(...
asked by 02.10.2018 / 01:10
2
answers

Removing white space [duplicate]

I have the following code var ola = "242 052"; How do I remove space from the variable? To make it look like this: var ola = "242052"; Thank you     
asked by 12.07.2018 / 18:10
1
answer

How to insert blank spaces - Javascript

I'm doing some exercises and one of them asks me to create a code that reproduces an "ASCII art", I read about it and saw it was a special character and tried to insert space in its unicode form "\ s", "\ u0020 ",but without success. I saw some...
asked by 06.08.2018 / 16:55
1
answer

LINK Anchor for Section Does Not Work in FireFox

$(window).load(function() { $('a.scroll').each(function() { var id = $(this).attr('href'); if (id.match('^#')) { var target = $(id).offset().top - 65; var title = $(this).attr('title'); $(this).on('click tap', functi...
asked by 14.09.2015 / 16:37
2
answers

What is the property of __defineSetter__ and __defineGetter__ for?

Whenever I open the Chrome Console, I keep an eye on the autocomplete of properties, to see if there is anything new, something I have not yet learned. And it struck me to see that objects have the property called __defineSetter__ and...
asked by 18.05.2018 / 20:06
2
answers

how to make a substring in an int in PHP

I have the following code: $chk_selectes = $_REQUEST['chk_selectes']; It receives via REQUEST a variable with this value: 000 or 001 or 011 or 111. I need to check each of these elements so I used: $um = substr("$_REQUEST['chk_selecte...
asked by 09.05.2018 / 20:58
1
answer

html input hidden fields do not exit in $ _POST

I have next jQuery // JavaScript Document $(document).ready(function() { $("#contato").on("submit", function () { var formData = new FormData(this); $.ajax({ url: "_requeridos/emailAcompanha.php",...
asked by 01.06.2018 / 15:30
1
answer

JS replace all characters equal

I'm trying to use the replace function to turn a letter into 0, however this does not work when I want to test the letter inside a var. var palavra = "abelha"; var letra = 'A'; palavra = palavra.replace(/(letra)/g, '0'); Any solution?     
asked by 17.06.2018 / 22:16