Posts by ElvisP • 1,523 points
168 posts
-
0
votes1
answer109
viewsQ: Duplicate result in Mysql in while
The table has two columns, one of user data and another of user points, the user points works like the bank statement scheme, but need to return only the last value, and I did so SELECT `usuario`.*,…
-
-1
votes2
answers312
viewsQ: Remove string after "dot" on a number
I have in a variable in javascript the value: <script> var valor1 = "123.33"; </script> I would like to remove the . 33, leave only the 123. Taking into account that this value is…
javascriptasked ElvisP 1,523 -
3
votes2
answers3796
viewsQ: "date(): It is not safe to rely on the system’s Timezone Settings..."
I took a system for maintenance, and when migrating to another server, started to give error in an input with the current date, ex:. <input type='text' value='<?php echo date("d/m/Y");…
-
2
votes3
answers2286
viewsA: How do I change the color of the iontabs?
Tab colors can be changed using Sass variables. See the conference app for an example: https://github.com/driftyco/ionic-conference-app/tree/master/src/theme404 In variables.scss: // Use the primary…
-
2
votes2
answers845
viewsQ: How to find and select option with select-specific label with jQuery
With jQuery, how do I change the label of an option, not value, example: <select id="meuSelect"> <option>[nao_selecionar_esse label]</option> <option>[SELECIONAR_esse…
-
0
votes2
answers2712
viewsA: Run PHP function inside onclick or href
Using javascript, the cool thing is that within the function, you pass any file to redirect, including with parameters: <a href="javascript:void(0)"…
-
2
votes1
answer480
viewsQ: Generate Twitter-Bootstrap Alert within the script itself by clicking a button
I wonder if it is possible to create and open a Twitter-Bootstrap alert (.Alert) with a custom message within the script itself, without having to create the custom div outside the script and call…
-
1
votes1
answer29
viewsQ: Correct desktop input toUpperCase on mobile with duplicate error
The script below turns all characters uppercase into an input. <input type='text' name='meuInput'> <script> $("input").bind('keyup', function (e) { if (e.which >= 97 &&…
-
0
votes1
answer350
viewsQ: Indentation after Focus in input with jQuery
After the field receives focus on page loading, the label is not displayed, need that when receiving focus on the input, that the page moves a little downward, to display the label. <form…
-
1
votes0
answers489
viewsQ: Bootstrap Alert in field validation
The form contains a validation for blank fields with a Twitter-Bootstrap Alert in the jQuery "on.click" event, when I click the button for the first time on the "Sign Up" button Alert appears, but…
-
0
votes0
answers59
viewsQ: PHP file requested by jQuery to respond only to the domain itself
I made a code .ajax() jQuery to avoid direct access to PHP files, but would like to improve the security of the requested PHP files, read on Access-Control-Allow-Origin and other tips, but I…
-
0
votes3
answers285
views -
0
votes4
answers253
viewsA: maxlength in coin mask
This function works perfectly: <script> //Chamar essa função na tag imput: onkeyup="moeda(this);" function moeda(z){ v = z.value; v=v.replace(/\D/g,"") // permite digitar apenas numero…
-
1
votes2
answers1448
views -
0
votes1
answer656
viewsQ: btoa javascript e base64_decode php
I am passing a string in javascript/jQuery using btoa(), the code is like this: <script> $(document).ready(function(){ $("button#btnGravarDados").on('click', function(){ var…
-
2
votes3
answers232
viewsQ: Filter array value
My array will be: $arr = array(); while($r = mssql_fetch_assoc($query)) { $arr = array('cnpj' => $r['cnpj'], 'empresa' => $r['nome']); } In while, there are several results (repeated CNPJ),…
-
1
votes1
answer7958
viewsQ: Using jsPDF to generate PDF
I used jQuery and jsPDF to generate PDF of the content of a DIV, the code created: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <script…
-
1
votes1
answer66
viewsQ: How do I check if a value already exists in my array?
My array has the structure below, before adding a new position, I would like to check if there is already "id_product" and if "Qtd" is still the same, I tried with the community answers but was not…