Posts by Caique Romero • 7,039 points
223 posts
-
0
votes2
answers254
viewsA: Assign a variable the value of a click on an image, to make a comparison
Just use the $(this) within the click function, in case it will point to the button that triggered the event click and will allow you to identify which image was chosen. In your case only by…
-
0
votes3
answers66
viewsA: I calculate with Javascript
First the properties min and max of your input will not work because they do not apply to type="text", so I switched to the type="number" and added the step="0.1" to increase the desired shape. I…
-
2
votes2
answers109
viewsA: Best way to get text + HTML from an array
The function .html(param) when past a string HTML as parameter defines the content HTML of each element in the corresponding set of elements, that is to say, different from .text() which only allows…
-
1
votes3
answers401
viewsA: How to create Mysql search that returns lines without matching?
There are several ways you can do this, I will demonstrate 3 here but it is important to take into account that the use of subselect or subquery may impair performance so where possible choose to…
-
3
votes2
answers34
viewsA: Select items that do not contain in a second table
There are several ways you can do this, I will demonstrate 3 here but it is important to take into account that the use of subselect or subquery may impair performance so where possible choose to…
-
3
votes2
answers264
viewsA: How to program a single check-box to checklistbox items?
You can scroll through your checkbox list and assign the checkbox state that will control the others, example: for (int i = 0; i < ck_Colaboradores.Items.Count; i++) {…
c#answered Caique Romero 7,039 -
6
votes1
answer145
viewsQ: What are dynamic properties?
I am studying ASP.NET and saw the following code snippet: ViewBag.QtdNovosComunicados = (from c in comunicados where c.DataCadastro > UsuarioLogado.dtUltimoAcesso select c).Count(); I understand…
-
5
votes3
answers97
viewsA: Execution or not of the increment in loops for
Guy the For works the same in both cases, the problem is that your comparison was glitch because in a place you started with 0 and the other with 1. With the exception of the For increments before…
-
1
votes2
answers2359
viewsA: Avoid form Ubmit by pressing the Enter key
Capture enter in your form and prevent the submit shoot like this: event.returnValue=false; event.cancel = true; Follows example working: function EnterKeyFilter() { if (window.event.keyCode == 13)…
-
3
votes1
answer104
viewsQ: What is and what are the differences between DOM, Window and Screen?
I read some definitions of these objects and in my understanding window is the first thing the browser loads and the object DOM is contained in it, being the DOM the representation of HTML. But I…
javascriptasked Caique Romero 7,039 -
5
votes1
answer200
viewsA: Difference between scroll functions?
Both generate the same result the difference is that the function jQuery .scrollTop uses the window.scrollTo to execute which is the same as Window.scroll(). So we can conclude that the…
javascriptanswered Caique Romero 7,039 -
3
votes2
answers451
viewsA: Apply CSS to a button
Thus the button is not inside the input but gives the feeling to the user. .grupo { margin: 0; padding: 0; } button, input, label { float:left; border:0; } .input_button { margin-left:3px;…
-
2
votes2
answers144
viewsA: Elements after the Hover Selector
In the CSS o(s) element(s) to the right of the selector :hover are the ones who will receive the style change. Basically the :Hover applies style(s) to the element(s) defined(s) by you when the…
cssanswered Caique Romero 7,039 -
1
votes1
answer142
viewsA: How to read the value of a readonly field?
I found a similar question on ONLY see if it fits you: dynamic elePrice = webBrowser.Document.GetElementById("price").DomElement; string sValue = elePrice.value; Or if you can’t use dynamic try…
-
4
votes1
answer96
viewsA: Date conversion
I created a formatting function, basically dismembered the date and was concatenating gradually. I concateno zero the left in a few moments to ensure that it gets 2 digits. In the hours I make a…
-
1
votes1
answer1510
viewsA: Merge the output of two Select’s - Postgresql commands
SELECT codigosuprimento , suprimento , count (codigosuprimento) quantidade , estoqueminimo , count (codigosuprimento) - estoqueminimo AS saldo , ( SELECT COUNT…
-
2
votes3
answers1523
viewsA: How to print Javascript variable value in HTML tag?
I believe it is easier to work by filling the date direct PHP: <input type="date" name="data" max="<?=date('Y-m-d H:i:s')?>" /> But if you want to limit by JavaScript remember that the…
-
3
votes2
answers3142
viewsA: How can I print the fifth part of a real number?
#include <stdio.h> #include <stdlib.h> int main (void) { double entrada, quintaParte; printf ("Digite um numero: \n"); scanf ("%lf", &entrada); quintaParte = entrada * 1/5; printf…
-
2
votes4
answers9608
viewsA: How to select more than one item in a Select Option
You can do this by just adding the attribute multiple in his select. <select multiple name="lista"> <option value="1">Item 1</option> <option value="2">Item 2</option>…
-
1
votes4
answers102
viewsA: How to create a button that randomly selects 3 out of 5 numbers
You can create a list of your options and use the function Math.() to pick up a random value from it, see the code below, I left it well commented to facilitate understanding. function add(_this){…
-
0
votes1
answer312
viewsA: Search in jQuery displaying the nearest TR as header!
I separated the table into several <tbody> to group the data. After the search on input will be displayed only the tbody that has in some of its lines a name equal to the value typed in input.…
-
2
votes1
answer82
viewsA: Merge the results of two SQL’s commands into H2
Separating select’s between parentheses works for Mysql and Postgresql. After discovering that it is H2 Database and that the Union sytax does not work the same I tried to get the result in another…
-
7
votes2
answers5698
viewsA: Select parent element with javascript (no Jquery)
Utilize parentNode: Node.parentNode var filho = document.getElementById("filho"); var pai = filho.parentNode; console.log(pai); <div id="pai"> Sou Pai <div id="filho"> Sou filho do meu…
-
1
votes2
answers168
viewsA: How can I see last deleted database database database database
Well I was able to save what was deleted in 2 steps. The solution came from a reply of SO in English that the Randrade showed me, I will share here because it can save the skin of another person ^^.…
-
1
votes2
answers168
viewsQ: How can I see last deleted database database database database
Is it possible to refer to the last deleted file in the database? If yes, how can I do that? The goal is to recreate it.
-
3
votes5
answers4681
viewsA: How to make a Rigger for a SEM jQuery event?
To trigger an event EventTarget.dispatchEvent(): Fires a specified Event for the Eventtarget by invoking the Specified eventlisteners, in an appropriate order. Processing normal rules (including the…
-
0
votes1
answer217
viewsA: How to organize pages with a table in Jquery
There are several ways for you to make pagination, I will demonstrate one using Datatable a plugin for jquery. Instead of creating a variable and mounting the HTML in it to then insert, you can…
-
3
votes2
answers2447
viewsA: fill in right-to-left input
Solution using text-align: input { text-align: right; } <input type="text"> The solutions below using the attribute say should apply only to languages that are written from right to left (such…
-
3
votes3
answers1253
viewsA: JS variable returning Nan
Like the Sergio commented, whether his HTML is static so the best solution is to make the sum by PHP. Now see that the problem in your solution with javascript occurs due to the contents of your…
-
2
votes5
answers2617
viewsA: Select last dates of each SQL month
Another way to perform this query, only with calculations: SELECT DATEADD(month, ((YEAR(data) - 1900) * 12) + MONTH(data), -1) FROM Datas See working: Sqlfiddle…
-
4
votes3
answers5329
viewsA: How to Remove Header and Footer with @media print CSS?
In the case header and footer of the browser know that it is possible in the settings: But I saw an answer in SO saying that this css effect: @page { size: auto; /* auto is the initial value */…
cssanswered Caique Romero 7,039 -
1
votes1
answer566
viewsA: I have a form validated with JS and need to send via PHP to BD
You must indicate in the property action of your form the page PHP that will request the data. For the data to be sent you need to perform the submit for that page, you can do it by javascript or…
-
4
votes2
answers234
viewsA: Reset an option-based Select
I created a <option> zero value in select of installments in case the form of payment is cash, created a classe to simulate a readonly in the select of installments so the user will realize…
-
7
votes3
answers89
viewsA: Redo the method instruction
We can solve the same problem iterativa (used a repeat loop) or through chamadas recursivas a uma função. To recursividade is the definition of a sub-rotina (função or método) that can invoke…
javaanswered Caique Romero 7,039 -
0
votes1
answer86
viewsQ: IE7 compatible CSS alternative
I need to adapt a website to the IE-7 in compatibility mode, I searched some libraries so that the bootstrap works, tried the same to use icons(Font-Awesome, glyphicon). Doubts I have? How can I use…
-
1
votes1
answer304
viewsA: Doubt - SQL Server Dates
I created a function to take the 1 working day of the month: CREATE FUNCTION [dbo].[PrimeiroDiaUtilMes] (@DATA DATETIME) RETURNS DATETIME AS BEGIN SET @DATA = (SELECT CAST(DATEADD(m, DATEDIFF(m, 0,…
-
13
votes1
answer8163
viewsA: What is a graph-based database?
Different from relational databases Graph-oriented database has other forms of data persistence Nosql. The idea is to create a model menos genérico that the relational model, providing a simpler…
-
3
votes3
answers701
viewsA: How to take the last four months given given date
From what I understand you’re wanting to display the exact date(s) (s) every X months ago, see if it suits you: function exibeData(){ var dataPreenchida = document.getElementById("Data").value; var…
-
0
votes1
answer32
viewsA: Timeline tab in Chrome, no
I’m not sure I understand your question correctly but you were referring to this button:? Show Overview on the flap Network…
google-chromeanswered Caique Romero 7,039 -
2
votes3
answers64
viewsA: Making a div reappear
The solution below is similar to @Felipe Avezani with the difference that the divRosa is saved at the moment when it is requested to clean the content, ie capture the value of it at that time,…
-
0
votes3
answers1971
viewsA: Calling javascript function from within a Classic ASP block
Is not possible you put the JS directly connected at the ASP then forget using it as part of logic because the way the ASP and the JS are processed is different, ie if you try to put your function…
-
0
votes5
answers1319
viewsA: Insert "X" value after some characters
If you need to manipulate the value entered in <textarea> after the form is submitted you must do this through the PHP, do this on the client side in addition to affecting the user experience,…
-
4
votes1
answer2103
viewsA: Dynamically populate fields according to CEP JSP Javascript
Take a look at this webservice: https://viacep.com.br/exemplo/jquery/ Here is an example of how to use it. $(function(){ $("#buscar_cep").click(function(){ //Nova variável "cep" somente com dígitos.…
-
0
votes3
answers257
viewsA: Event onclik button in dynamic html Stringbuilder table
You need to concatenate the string so that it returns one HTML valid. At that point the HTML no longer valid: <td> <button id='btnVisualizar' runat='server' class='btn btn-default'…
-
0
votes1
answer40
viewsA: Problems to count and group fields in the database
From what I understand your question would be the following. Display the quantity of items grouping by sale and by product, display the product description, display the sale identification. See if…
-
3
votes2
answers960
viewsA: Problem with Datepicker
The datepicker works by default on top of the input so instead of putting it in the image you can just focus on the input field. Another way to solve is by using the properties of datepicker: Showon…
-
1
votes3
answers527
viewsA: if with console.log condition?
The Javascript has some forms of Display, the Console.log() is one of them. Console.log() Write to the browser console, it is used for debug (code debugging) purposes, it takes a single parameter…
javascriptanswered Caique Romero 7,039 -
3
votes3
answers5883
viewsA: Disable button after click
There are several ways to do this, but you basically need to capture the click event and use the disabled property. https://www.w3schools.com/tags/att_input_disabled.asp function desabilitaBotao(){…
-
3
votes2
answers220
viewsA: How to send form but remove null fields
In case you just wanted to hide from URL just use POST. <form action="" method="POST"> If you really don’t want to receive these values then you can do it in some ways: Add property disabled;…
-
1
votes1
answer925
viewsA: How to make a div disappear and appear with Javascript
In case you already have the image in div id="lixoLimpaConteud" then I am basing on it to "restore" the content, I left the code commented for better understanding. function alteraConteudo(imagem) {…