Posts by gleisin-dev • 758 points
28 posts
-
4
votes3
answers117
viewsA: Limit HTML content in Divs and distribute in the following dynamically?
You can distribute them as follows! Adding up the number of characters and check if you have reached the value maximum defined in the function parameters. For this, simple conditions were applied..…
javascriptanswered gleisin-dev 758 -
1
votes4
answers35105
viewsA: Use of ? and : in PHP
It is worth mentioning the conditional structure "If/Elseif/Else" in ternary That is, if you want two or more expressions, without requiring the use of "If/Elseif/Else" or "Switch/Case" just follow…
-
-3
votes1
answer99
viewsA: How to get a certain html tag from an external site?
Not recommended! but I used the function preg_match_all For that I created a simple Pattern, to obtain the respective values. However, with only the function file_get_contents() could not locate…
phpanswered gleisin-dev 758 -
0
votes1
answer25
viewsA: How do I click a button after the window.open() event?
You may be using the event load for this! Just put under the code: site = window.open(`https://exemplo.com/send?valor1=${valor1.value}&valor2=${valor2.value}`); A addEventListener of the element…
-
4
votes1
answer90
viewsA: An easier way to write this line of code? Please?
There is! the String Concatenation that the binary operator is also used + (plus) Example of String Concat: const data = new Date(); // fazendo o uso do String Concat document.write("<body>" +…
javascriptanswered gleisin-dev 758 -
1
votes1
answer63
viewsA: Turn text into voice with Speechsynthesis
Occurs due to function getnAttribute is wrong! the correct would be getAttribute Although I don’t necessarily need an answer (for future purposes, the tip!) and even for lack of some important…
-
1
votes1
answer85
viewsA: How to project the value that is inserted into an input into the content of another element?
The problem occurs due to the current operator used.. First of all I suggest you see the Allocation operators, because you are "assigning" the value and not "adding up" Assigning: in other words,…
javascriptanswered gleisin-dev 758 -
-3
votes2
answers120
viewsA: How to organize a JSON by date
Based on your question I have found the following solution.. In short, I have stored the dates in a new Array and turned them into timestamp, into research, a single instant according to hkotsubo’s…
-
0
votes2
answers294
viewsA: upload with ajax and formdata displays error
Replace the excerpt from submitHandler: function( form ) { ... } for submitHandler: function( form ) { // cria um objeto com os respectivos valores (ao efetuar as solicitações, será convertido) //…
-
0
votes1
answer55
viewsA: Questions and answers using Ajax
First of all.. information was missing in your question, so I suggest that DON’T LET to see How to create a Minimum, Complete and Verifiable example and How to ask a good question? to thus elaborate…
-
0
votes1
answer62
viewsA: Calculation of additional in percentage with jQuery
From what I understand of your question.. is that you want to calculate values with additional (by visa discounts and promotions). Your code is only adding up the values and not the percentages, the…
-
2
votes1
answer44
viewsA: How to create new element from input form?
I made use of the HTMLTableRowElement.insertCell() to insert new cells into your table.. incidentally, it is worth taking a look at the documentation Htmltablerowelement. I necessarily had to make…
-
-2
votes1
answer37
viewsA: Is it possible to use display block and flex together?
Before knowing whether it is possible or not we should know what each one does, be it Block or Flex What does the display: block? Causes the HTML element to be rendered as block as with the…
cssanswered gleisin-dev 758 -
2
votes2
answers68
viewsA: How to hide class when clicking outside an input
You may be using jQuery and its events focusin and focusout $(function() { $('#pesquisa-int').focusin(function() { $('.resultado').show(); // exibe o conteúdo da div após o input está em foco. });…
-
4
votes1
answer68
viewsA: Alignment of elements on the page
I suggest that.. you made use of the CSS Grid Layout as it makes it easier when organizing the elements on the page. I made a small example code, because your question is missing information. Be…
-
1
votes2
answers2087
viewsA: How to pass arguments to a PHP script via command line?
You can be using the function getopt() which is nothing more than an abbreviation of "Get Options". <?php $args = getopt('f:'); // refere-se ao parâmetro "-f" print_r($args); // será imprimida e…
-
1
votes1
answer125
viewsQ: Greeting Functions "Good morning, Good afternoon and Good evening"
Today I came across a very interesting topic, which are the greetings "Good morning, Good afternoon and Good night" in Javascript (and among other languages..) Where in failed attempt to create a…
-
1
votes2
answers135
viewsA: Over or under age
In your code you ended up escaping logic, using the variable idade for 2 actions, where the result of the same would be "I Vinicius, I am of age, I am of age and I was born in the city of São Paulo…
-
0
votes1
answer100
viewsQ: How to create specific validations using Regex
I have the following data 30140083|MG 13407061|07309482697|12/01/86|EMILLY L V GOMES|4984012024889591|10/2018|557 3283005|165055881|07309480805|11/18/16|AILTON B TEGON|5549320054855241|6/2018|177…
-
1
votes2
answers114
viewsA: Update the HTML table using Jquery and PHP
Your question is not so clear, but I did something similar, it is not so dynamic, but it works! $(function() { // dados armazenados como objeto (opcional, podes obter através de API) var hosts =…
-
0
votes3
answers59
viewsA: How to change closed name and red color by open name and blue color when clicking on name?
Using Javascript to check the current situation, is not very dynamic, but works! document.querySelector('p').addEventListener('click', function() { // evento da tag <p> ao ser clicada! if…
-
0
votes3
answers45
viewsA: Problems centering content when working with flexbox in CSS
Using the Grid becomes more flexible (incidentally, this way is already flexible) you adjust the items according to the container, this way: body, html { margin:0; padding:0; width: 100%; /* ocupar…
-
2
votes2
answers68
viewsA: Move element up in 50% of its size
Applying the property margin-top inserting -10% of the value that is positioned! html, body { height: 100%; } body { background: #8844ee; } .card { height: 100%; display: flex; justify-content:…
-
0
votes1
answer595
viewsA: Read and Edit JSON File via JS!
In this case it would be necessary to write the amendments in back-end If it’s something totally temporary, no Client-Side just use the var jsonObj =…
-
1
votes2
answers123
viewsA: Upload c# files to API
Why don’t you change the WebRequest for WebClient, using it in this way: using (WebClient WC = new WebClient()) { WC.UploadFileCompleted += UploadCompleted; WC.UploadProgressChanged +=…
-
0
votes2
answers40
viewsA: Text accompany the movement of the div
If you are not using any Framework (such as Bootstrap or Materialize), create the class below and see what results! .resize-content { min-height: 30px; /* ajuste conforme seu gosto */ min-width:…
cssanswered gleisin-dev 758 -
1
votes1
answer39
viewsA: Create array from another json array in php
I don’t know if this is the way you need it, but I hope it serves as a stepping stone to your project. <?php $urlHistorical = 'http://mfinance.com.br/api/v1/stocks/historicals/IBOV?months=3'; //…
-
1
votes1
answer106
viewsQ: Sorting the contents of an Array
I have the following Array with the relevant data applied: Card Number Month (Validity or Maturity) Year I get this data from a API but in a "disorganized" way. I would like to treat these values to…