Posts by Caique Romero • 7,039 points
223 posts
-
2
votes2
answers547
viewsA: Search ID in a PHP select
=> is used to associate key and value in a vector. -> is used to access a method or property of an object. <select class="form-control" name="cliente"> <?php if ($clientes) { //Se…
-
10
votes2
answers2129
viewsA: What does the "|=" operator mean in Python?
For integers, it is the bit-by-bit compound assignment operator or OR. Like all compound assignment operators, a | = b is the same thing as a = a | b. Where the | is the symbol of OR bit by bit. |=…
-
1
votes2
answers501
viewsA: Jquery Datatables filter for full phrase
search smart. enables intelligent filter activation and inactivation Smart filter: Breaks the user input into individual words and then corresponds to those words at any position and in any order in…
jqueryanswered Caique Romero 7,039 -
1
votes2
answers317
viewsA: Problems with Onchange in select?
Dude from what I understand the problem is that the this you are putting is referring to a different scope in case the function of the button event, change of onchange="funcao('+this.id+')" for…
jqueryanswered Caique Romero 7,039 -
0
votes4
answers127
viewsA: Javascript Concatenation between Arrays
You must traverse the vector by storing the values of 3 in 3 and assigning them to a new vector. var comida = ["Cafe","feijao","frango","batata","pao","miojo","laranja","mouse","teclado", "ovo"];…
javascriptanswered Caique Romero 7,039 -
3
votes3
answers111
viewsA: Prevent data from appearing in MYSQL search
Guy in this case you need to report two conditions on WHERE of your SELECT: SELECT * FROM tabela_exemplo WHERE Produto = '030' AND Compra >= 0; Operators AND, OR and NOT The WHERE clause may be…
-
3
votes2
answers112
viewsA: Lock of characters with exception e-mail field
I don’t know if I understand your question correctly, but in your code you apply the expression to all inputs. An alternative is to define the inputs you want to validate through a class. Note: the…
javascriptanswered Caique Romero 7,039 -
0
votes2
answers3313
viewsA: I need to list the amount of an 'X' product that each customer bought
Table contains appears twice in your query, remove it from from SELECT cliente.Nome , produto.Descricao , contem.QuantItem FROM cliente INNER JOIN pedido ON cliente.Codigo = pedido.Codigo INNER JOIN…
-
5
votes4
answers702
viewsA: Column 'idusuario' in Where clause is ambiguous
When you search for data in more than one table and they have repeated column names you need to tell which table the column is from. In case you did correct in the INNER JOIN but forgot to inform on…
-
6
votes3
answers33037
viewsA: How to use the Icon tag in HTML?
I do not know such tag (icon). To insert an icon, you can add the class name of the icon to any HTML element inline. The elements <i> and <span> are the most used to add icons. You…
-
3
votes4
answers819
viewsA: How to make a function to tell when an array is empty?
Check the length array. vetor = []; vetor1 = ['item1']; validaVetor(vetor); validaVetor(vetor1); function validaVetor(vetor){ if(vetor.length>0){ console.log("Vetor populado"); }else{…
-
0
votes2
answers153
viewsA: Javascript message not appearing in input
You are assigning the value to an element that does not exist retorno. Check that the page returns the desired information and correct the field where it will be assigned. Change of success:…
-
0
votes1
answer78
viewsA: how to put different color in a title with jquery array
As Hudsonph said the best would be to use css as a solution, but if you need to manipulate an array you already know with jquery, try the following: var cores = ['red', 'yellow', 'gray', 'orange',…
jqueryanswered Caique Romero 7,039 -
2
votes1
answer664
viewsA: Validation of fields with Javascript in JSP
Basically you need to change onkeypress="validar()" for onclick="validar()" as the function should start as soon as the user clicks the button. But remember that you can explore many improvement…
-
3
votes1
answer1426
viewsA: Find out which image size was inserted by input file
After image loading you can get these values through its properties, example: console.log($(img).prop('height')); console.log($(img).prop('width')); $('#teste').load(function(){…
-
6
votes1
answer185
viewsQ: How to concatenate conditions into multiple lines?
I am working with a legacy system and it has some IF’s with many conditions, with the intention of improving the readability of the code tried to break these conditions in several lines.. If rs(0) =…
aspasked Caique Romero 7,039 -
3
votes1
answer185
viewsA: How to concatenate conditions into multiple lines?
The Classic ASP awaits the Then at the end of the same line to interpret the end of the condition, to concatenate the conditions into several lines we need to use the _. Adding the underline _ at…
aspanswered Caique Romero 7,039 -
3
votes2
answers1192
viewsA: Display Mysql date in date field
Try to format the date to YYYY-MM-DD. This is the format accepted by HTML5. If you really need to modify or mask the date try to view this topic:…
-
1
votes2
answers488
viewsA: Select values of a <td> with click
Well, there are some things you need to fix in your code. I suggest you visit afterwards http://api.jquery.com/ to have a better understanding. Come on: Use class for elements that will repeat the…
-
1
votes1
answer390
viewsA: Mask with Regex and replace to allow single digits and a single hyphen
I researched here some alternatives, with Regex or Maskedtextbox(This did not help me much because by default it is not accepted in toolStrip where my textbox was). In the end the best solution I…
-
2
votes1
answer390
viewsQ: Mask with Regex and replace to allow single digits and a single hyphen
What I need: A mask that works in the event keypress of a TextBox replacing what is not numerical and excessive hyphens with "". What is my difficulty: Check the entry of only one hyphen in the same…
-
1
votes3
answers134
viewsA: How do I allow only digits in an input field?
You can use type="number" or validate what is typed with javascript. $("input.inteiro").keyup(function (e) { // Filtro o que não é digito if (/\D/g.test($(this).val()))…
-
2
votes3
answers261
viewsA: Take the value of the Jquery variable out of if
Explanation of the problem: If you declared his variable within the if or Else is indifferent the problem is that the variable his in your code only exists within the scope of your click function…
jqueryanswered Caique Romero 7,039