Questions tagged as 'javascript'

1
answer

Remove single quotes from javascript

I need to remove single quotation marks from a string, I've already tried string.replace(/\'/g, '') .replace(/"'"/g, '') and it does not work, can anyone help me?     
asked by 09.11.2017 / 17:54
3
answers

How to Block a button

I have a system where you have registered items and the logged in user tries to hit the results of those matches. Each game has a id of register that is named (game) in the database. My question is: how do I get the user to only bet on...
asked by 09.11.2017 / 13:17
1
answer

Use parameter passed in function inside the map ()

My role: nameById (url, list, getter = "name") { let name = ''; let id = url.split('/').reverse()[1]; list.map( user => user.id == id ? name = user.name : null); // name = user.getter return name; }, Is there any way to u...
asked by 10.11.2017 / 14:44
2
answers

Capture hidden value in lopping

I would like help on how to get a value from a hidden that is in a utility. I need this value to send to the next screen, but since it is in a multi-line table, I can not do that. I need to get this value in javascript. The screen: &...
asked by 10.11.2017 / 02:10
1
answer

Sentence with different HTML5 formatting

What is the best way to write a code with a phrase that contains several font formatting. EX: This phrase (bold and blue color) that I'm writing as an example (italic not bold and red) contains in parentheses the formatting of each word, h...
asked by 09.11.2017 / 13:16
1
answer

Problem registering nested objects in Mongodb with mongoose

I have the following collection: // SUSPEITOS - INICIO // const suspeitosSchema = new mongoose.Schema({ nome: { type: String }, sexo: { type: String }, corPele: { type: String }, altura: { type: String }, peso: { type: String },...
asked by 09.11.2017 / 19:40
1
answer

Submit form with empty checkboxes and receive their value on the server

I'm getting a form with AJAX and Jquery and sending for treatment in a PHP file with name getPDF , in this form there are several checkboxes with different values, but name and class are equal ( name = ' check[] ' and class = '...
asked by 09.11.2017 / 14:08
1
answer

Loop for in getElementsByClassName

Why when I use for in to apply a rule to all elements of an html class through javascript until it works but does it always appear this error in the console? TypeError: document.getElementsByClassName (...) [i] .style is undefined var...
asked by 12.07.2017 / 00:30
2
answers

Print list content with jquery ajax

I have a jquery ajax code that returns me data from a request, but it returns me a line and then erases and plays the next one on top of the previous one, I want it to print on the screen 1 result below another as a list, how can I do this?...
asked by 08.07.2017 / 02:34
1
answer

Script does not work in IE but works in other browsers

Script does not work in IE but works normally in other browsers, the error occurs in: jQuery(central).prop("disabled", false); and the message I get is:    SCRIPT5009: 'central' is not defined. I've tried .prop and .attr...
asked by 06.07.2017 / 23:46