Posts by Rodrigo Zem • 895 points
57 posts
-
0
votes1
answer79
viewsA: Date problem in PHP (SELECT)
<? $data = "13/05/2019"; $data = explode("/",$data); if( strlen($data[0]) == 2 ) { // este comando abaixo irá inverter a data em caso de um formato ou outro. $data = array_reverse($data); } $data…
sqlanswered Rodrigo Zem 895 -
1
votes1
answer83
viewsA: Handle Multiplus elements by ID
$(document).ready(function() { var id = []; $(".input-file").find('input').each(function(index, dom) { id[index] = dom.id; $("#" + id[index]).parent().find("button.btn-reset").addClass("hidden");…
-
1
votes2
answers1918
viewsA: Input Cpf and phone accept only number
You can use this javascript function below: function isNumber(evt) { evt = (evt) ? evt : window.event; var charCode = (evt.which) ? evt.which : evt.keyCode; if (charCode > 31 && (charCode…
-
1
votes4
answers317
viewsA: Regex to identify all occurrences of years
Follow Pattern to catch only the year 2012 which is the rightmost year as you said (?:.*?\K20[1-2]{1}[2-9]{1}){2} Click here to see the Example…
-
0
votes3
answers86
viewsA: How to position the Text of a span below a Spinner
You can also use this very easy to use jquery plugin. $("#cover-spin").LoadingOverlay("show", { background : "rgba(165, 190, 100, 0.5)", text : "Carregando...", size: 25 }); #cover-spin {…
-
0
votes2
answers157
viewsA: Search that shows the contents of a div
Try the code below: type candy, or cake, etc. $(function(){ var data = { "receita": [ { "nome":"Doce de Leite Ninho", "ingredientes":"200 g de biscoito de maisena.<br>4 colheres (sopa) de…
-
0
votes2
answers135
viewsA: Send JSON Javascript data to PHP
Use json_encode to display json. Example: $fruta[1] = 'Laranja'; $fruta[2] = 'Banana'; $fruta[3] = 'Abacate'; echo json_encode($fruta); Upshot: {"1":"Orange","2":"Banana","3":"Avocado"}…