Posts by Leo • 537 points
53 posts
-
0
votes1
answer65
viewsQ: Choosing how many DIV’s to mount at a time within a . map()
Good morning guys, I went through a recent situation where I had to resolve the basis of a gambiarra but I wonder if there is a way to do what I had in mind at the time but could not accomplish. The…
-
0
votes0
answers68
viewsQ: Headers on GET request with SWR
Good morning guys. I would like to know how I can pass headers on a GET request with the SWR. My need lies where I need to show all the registered products of a company, where the ID of this is…
-
0
votes1
answer197
viewsQ: Component is rendered again whenever some input state is changed
Good morning guys. I am developing an application where the user registration is according to the option that it selects " Physical or Legal ". According to the option that he chooses a form is…
-
1
votes2
answers636
viewsQ: Return of a Knex query using . map
Good afternoon, you guys. I have a Controller that receives data from a frontend spreadsheet, read the dice and play these to run a query in the database, so my intention is to play the results back…
-
2
votes0
answers219
viewsQ: Doubt about useState refactoring when implementing the SWR?
I’m starting in this world of Javascript and I have a project that I’m developing that I did the implementation of SWR in the same and with that I stopped using the useEffect and the useState of the…
-
-1
votes1
answer121
viewsQ: Queue schema for PHP code
Good afternoon guys, I’m having a question/need that I haven’t found how to do. I have a code that I use to run several Cnpjs through the Sintegra API, where with the result returned by this I feed…
-
2
votes2
answers343
viewsQ: Input with CPF/ CNPJ mask undergoing change by keys like TAB and ENTER
Good morning guys. I have an input where this is typed a value and as the size of this gets the mask CPF or CNPJ. The problem I’m having is that when a CPF is typed with the correct size for…
-
0
votes4
answers93
viewsA: Enable input type="file" when input type="checkbox" == true
You can check the event of change using jQuery for whenever the checkbox changes from " state, "it enables or disables the input. This way: $(document).ready(function() { $("#Opcao1").on('change',…
-
1
votes2
answers91
viewsQ: JS not formatting the thousand value correctly for Input and not receiving correctly in PHP / Database
Good morning people, I have in my forms some input’s where the user informs the value of the product, its quantity and with this is made the calculation of the Product Value and also the Total Order…
-
1
votes1
answer44
viewsA: Identifying the correct fields according to Select to fill in the correct Index data
I managed to solve the problem, just changed the following Function: $(document).on("change", "select", "[name='select_produtos[]']", function () { var wraper = $(this).closest(".produtos-wrap");…
-
0
votes1
answer44
viewsQ: Identifying the correct fields according to Select to fill in the correct Index data
Good morning guys, I have a problem where I have done something similar in other functions of my system but this particular one is not working. I have a function that adds and removes Divs of…
-
0
votes1
answer79
viewsA: Add data from database
Well, as you said in the comments that you only need the total value and not the separate values, you can change the functionality directly in your query that will work, just leave your code this…
-
0
votes2
answers52
viewsA: PHP page inside a PHP page
First to send the data to another page you used the method POST, besides that you don’t need the HTML code in the other file, you just need to receive and treat the data the way you want ( don’t…
-
1
votes3
answers696
viewsA: How to make a custom filter using the Bootstrap Selectpicker?
I was able to solve the problem by reformulating my personal filter functions, thanks to everyone who tried to help.
-
2
votes1
answer258
viewsA: Return last field included jQuery
Dude, as I said I made an example for you to base. The question you can do to solve is to use the attribute last() jQuery that will always take the last existing attribute, whether from a specific…
-
1
votes2
answers181
viewsA: Reduce image along with div
Dude, since you’re wearing the bootstrap, just wear the class: img-fluid on your tag img. Would look like this: <a class="navbar-brand" href="index.html"><img class="img-fluid"…
-
4
votes3
answers696
viewsQ: How to make a custom filter using the Bootstrap Selectpicker?
Good morning guys. I have a problem using Selectpicker to make a Combobox with the products I bring from BD with PHP. My problem is this: I need to make a "custom" filter because when I put inside…
-
1
votes3
answers216
viewsA: Insert a form with while
Good morning man, what you can do is the following. First on your FORM you will put at the end of each name of inputs a [] so that it becomes a kind of array when you send the data to PHP. With…
-
0
votes2
answers40
viewsA: Insert mysql database
If you will receive the variable $valor front-end or similar where the user will enter the value and give a Ubmit, you can do the following: $valor = sizeof($_POST['valor']); // ou $_GET ( caso…
-
1
votes2
answers356
viewsA: How do I remove the underline in the link?
just put it like this in your css: a { text-decoration: none; } Or put the name of idor classe of your tag you want to take.
-
1
votes2
answers382
viewsA: reset variable increment javascript
Guy from what I understand you want the index of your element to auto-increment and auto-create at the click of your add and remove buttons. This here should solve your problem:…
-
1
votes1
answer27
viewsA: I need to compare variables with the lack of information
Friend, I believe you can do it this way: Function Register(){ var titulo = document.getElementById("titulo").value; var editora = document.getElementById("editora").value; var conteudoTabela =…
-
5
votes1
answer92
viewsQ: .clone() not registering Select value in cloned DIV
Good afternoon guys, I think it may be something really stupid, but I can’t identify why the clone that I make of my page to be able to print 2 ways, is not capturing SELECT value of my products, it…
-
1
votes2
answers61
viewsA: "You have an error in your SQL syntax" with array
Dude, I think it’s all about the bad formatting of your code, and I saw some mistakes, and I’m sending you here. I believe the biggest problem was in its variable $sql because your query was not…
-
0
votes1
answer128
views -
2
votes1
answer1368
viewsA: What is the difference between ID="" and NAME=""?
Well, as the name says ID is an "element" where this should be unique, that is, the name you put in the ID of an element, should not be repeated in the code, as it generates conflicts. Already the…
-
2
votes1
answer39
viewsQ: Bugando Bank Field with Thousand values
Guys, I know it’s a very basic question, but how do I make a field of my bank accept values where these are values like 1000+ and also come as decimals. I will show an example below in the value of:…
-
2
votes2
answers511
views -
0
votes0
answers88
viewsQ: PHP error while trying to pull data from Mysql database
Good morning guys, okay? I got a problem on the next one. I hosted my PHP site on a Server where there is the DNS and the main suffix of the network, so that the site can only be accessed internally…
-
0
votes2
answers118
viewsA: Create data loop received by post and insert into mysql
Oh my friend, all right ? Man to do this is quite simple. You only need to use an element of your HTML as a " size " reference for PHP to go through all the data. In second step, in your HTML you…
-
1
votes1
answer179
viewsA: Send several checkbox values to the database
Dude, I don’t know if I really understood if this is exactly what you want, but I quickly made a code here to go through the amount of input that you will have created in your Form and identify the…
-
1
votes1
answer807
viewsQ: How to change elements dynamically through Checkbox?
Guys I have a problem where I need to make a function with parameters aiming if a checkbox is marked or not. I managed to make for another field, but this was static, now I need to make for elements…
-
1
votes0
answers76
viewsQ: Why does Bootstrap class have no effect on Cloned elements?
I have a problem where I have a product DIV and in the select of the product name, I have a selectpicker where I can search the name of the product among all existing. But when the user adds another…
-
0
votes2
answers777
viewsA: What is the difference between the 'Outline' and 'border' properties?
Well, Outline works only when the input or field is in focus, and as far as I’m concerned, you can’t change many of its features as much as you can change in Border. The Border, however, is as the…
-
0
votes2
answers49
viewsA: How to create a code snippet dynamically in Javascript?
Good morning. I made a code using Jquery so that you can have control of the number of "Forms" created, where there is an index with autoincrement and dynamic decrement ( because I also added a…
javascriptanswered Leo 537 -
0
votes2
answers369
viewsA: Flex vertical alignment
As you said yourself the need, what Voce can do is, instead of using the tag <br> to separate the blocks, Voce can place the amount of items needed within each block of items, where they will…
-
0
votes2
answers94
viewsA: jQuery selecting the element itself
You can do something like this: $(function () { var clone = $("[name='phone[]']").html(); $(document).on('click', '#add_phone', addPhone); function addPhone() { $('#add_phone_div').append(clone); }…
-
3
votes2
answers37
viewsQ: Doubt as to whether to exclude specific elements of the clone() function
I have a doubt about the exclusion of specific elements when I use the function clone(). I wonder if I can rule out the elements <b> when I call the function. That is, what is written "Item",…
-
0
votes2
answers719
viewsQ: Total sum with multiple values dynamically using jQuery
I’m trying to do a function that takes the values of all <div class="preco-produto"> make the total sum and population in the <div id="final">. I made the function that separates the…
-
0
votes1
answer166
viewsQ: Add and Remove Divs Function with PHP and jQuery
Good morning guys, I’m facing a problem and I’d like to know if anyone can help me. I have developed a code to add and remove Divs dynamically and with autoincrement and decrease of the index. The…
-
1
votes3
answers167
viewsA: What’s wrong with the Bubble Sort algorithm?
Dude, I think you’ve even created enough code to try to do the method. I made one in college, where it shows how the vector is in each sorting step, if you want to use example or "motivation" to fit…
-
0
votes3
answers171
viewsA: Align a div that contains a text with a div that has a login box
I made an example for you using the bootstrap showing how you can leave your template. HTML: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Teste…
-
0
votes3
answers171
viewsA: Align a div that contains a text with a div that has a login box
". text-banner" would be the one you want to align right ? If it is, it changes the property from "float: left;" to "float: right;". But if you want to align the two equally, you can place the 2…
-
0
votes2
answers52
viewsA: Xmlhttprequest problem
I think your problem is on the line: "readJsonFile("file://States/"+state+". json", Function(date) {" You have 3 "/", put the correct way and test.
-
0
votes4
answers1357
viewsA: associate a checkbox to a script function
Good morning, Dude, you can try it like this: HTML: <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <title>Teste</title> <script…
-
2
votes1
answer315
viewsQ: CNPJ Mask function for field with dynamic value
I’m having a question on the following occasion, I have a maskCNPJ function where the function obviously adds a mask on the supplier’s CNPJ number. The problem that is happening, comes from the fact…
-
1
votes3
answers63
viewsA: Simple doubt about production of a site
Good morning, Dude, I don’t think it’s the only way that there is, because there are so many ways to do the same thing. But for all I have known, this part using Javascript ( mainly with the help of…
-
1
votes1
answer71
viewsQ: Help with function to add and remove Divs with Autoincrement
I made a code to add a DIV (wrap-products) with all the HTML elements that are inside it as soon as the "+" button is pressed. Each DIV is added one below the other with the same characteristics,…
-
0
votes2
answers91
viewsA: how can I take a value of a variable in javascript and 'concatenate' in a <p> text in html?
I believe you can also put the value inside the "p" tag without using the two Spans that Voce created. Try this way: document.getElementById("valor").innerHTML = jogadorScore + ": Score"; And in…
-
4
votes2
answers638
viewsQ: Capture input value dynamically with Jquery
I’m having a problem where I need to multiply the value of two input fields (price and quantity) to play in a third field (product price). My problem occurs where I try to get the value of these…