Posts by Rui Ferreira • 321 points
24 posts
-
0
votes2
answers616
viewsA: How to make a SELECT DISTINCT with COUNT in Mysql?
Good day, Try: $select_relatorio = "SELECT TIPO_ATIVIDADE, count(TIPO_ATIVIDADE) as 'contagem' FROM tbl_atividades WHERE DEPARTAMENTO = '$departamento_usuario' group by TIPO_ACTIVIDADE";…
-
2
votes1
answer192
viewsQ: Replace HTML tag with text with regex
I need to replace an HTML tag (with a specific attribute) with a text, follow my example below: String stringTest = '<variable data-id="1" name="test2" style="background-color:red;">Variable…
-
0
votes2
answers99
viewsA: Problem respecting grids, adding fields dynamically
1 - remove the div id="people-container", id must be unique, if necessary create a class 2 - uses html append instead of creating div, this new div will not contain styles, and therefore does not…
-
0
votes3
answers84
viewsA: Why is adding two values to decimals not an exact result?
I think it’s better to do roundabout, tofixed may not give the expected value. function myRound(val, dec) { return (Math.round(val*Math.pow(10,dec))/Math.pow(10,dec)).toFixed(dec); } var valor1 =…
javascriptanswered Rui Ferreira 321 -
0
votes2
answers97
viewsA: Problems with setInterval()
The inter variable is global, cannot be declared again, just set interval would be like this: var inter = setInterval(function(){ plusDivs(1); }, 2500); $(".mySlides").mouseenter(function(){…
jqueryanswered Rui Ferreira 321 -
2
votes1
answer75
viewsA: Error in paging inside tab
This may be because jPages (not tested) is already defined. Try: <script> $(document).ready(function(){ $(".press").on('click',function(){ if ($(".pagination").jPages()) {…
-
1
votes2
answers103
viewsA: Submit form when changing checkbox
Experimente assim: $('input[type=checkbox][name=slideThree]').on('click', function() { $("#form_onoff").attr("action", "inc/onoff.php?id=<? echo $_SESSION['ids']; ?>"); …
-
1
votes3
answers173
viewsA: Why my load does not load after Submit
I do not know what the form Ubmit does, but in this case it is better to use ajax: $("#btnenviar").on('click', function(e){ var params = $('#formenvio input').serialize(); $.ajax({ type: "POST",…
-
-1
votes3
answers2664
viewsA: How to use sessionStorage?
Try changing in the code (both in the setItem and getItem): window.localStorage for sessionStorage
javascriptanswered Rui Ferreira 321 -
0
votes2
answers104
viewsA: How to take checkbox values and insert them into the bank
Experiment with serialize function: var params = $('input:checkbox').serialize();
-
1
votes3
answers1413
viewsA: Handle accent with Jquery
Check that the encodeURI function does what it wants, for example: var myStr = "Afonso Cláudio"; var res = encodeURI(myStr); function to remove accents: function removerAcentos( newStringComAcento )…
-
1
votes5
answers683
viewsA: How to take input readonly
The problem seems to me because you are using jquery before it is set, pass your javascript tags to the bottom of the page after jquery include
-
0
votes5
answers683
viewsA: How to take input readonly
You can do it like this: $('input[name="regiao"]').prop('readonly', false);
-
3
votes1
answer46
viewsA: "numberFormat" is not a Function, but she is
Try: valorProduto = parseFloat(produto[0]['proValor']);
javascriptanswered Rui Ferreira 321 -
1
votes2
answers227
viewsA: Capture Hidden value in lopping
Adds class to inputs: <input type="radio" class="listaIndice" name="listaIndice" value="${idxLinha}" /> <input type="hidden" class="listanuContrato" name="listanuContrato"…
-
1
votes4
answers554
viewsA: Correct CSS Div > li > span
Try it like this: .AlterarCSS ul li span { background: yellow; }
cssanswered Rui Ferreira 321 -
0
votes1
answer29
viewsA: SQL query with WITH to group
WITH Consulta AS (SELECT DT_RFRN_MVMN, TX_DATA_VNDA, CD_BNDR, CD_CRDE, CD_PCSR CD_EMSR, CD_TIPO_PLTF_PGMN, CD_TIPO_TRNS_BNDR_RECB, …
oracleanswered Rui Ferreira 321 -
1
votes1
answer30
viewsA: Bring descriptive information from a PHP sequence
I think I just need to change this line of code by putting $DS_CONVENIO in value: <option value="<?=$DS_CONVENIO?>"><?=$DS_CONVENIO?></option>
-
0
votes3
answers307
viewsA: Button and span logic from CSS
If noticed the button already wins the class . onestepcheckout-place-order-button-disabled. So I think you just need to add the following CSS: button.span{ display:none; }…
-
1
votes2
answers232
viewsA: How to pass a direct path to an html inside the iframe tag
You can do a function by passing the url as parameter. The function would be called in an onclick event from the menu. function loadIframe(url) { var $iframe = $('#iframeTeste'); if ( $iframe.length…
-
1
votes4
answers10811
viewsA: How to get the text of the selected option inside a select?
function getSelectedText(elementId) { var elt = document.getElementById(elementId); if (elt.selectedIndex == -1) return null; return…
javascriptanswered Rui Ferreira 321 -
0
votes4
answers3559
viewsA: Increment a counter within a php foreach
<?php $i = 1; $c = 0; foreach ($enderecos as $endereco) { $j = $i + 1; ?> <input type="text" name="endereco[<?php echo $c;?>][cep]" value="<?php echo…
-
0
votes2
answers631
viewsA: Update div with checkbox value marked
With jquery: $( "input:checkbox" ).on('click', function() { // evento click para inputs checkbox $('#myDivId').html(''); // limpa div $( "input:checkbox" ).each(function () { // percorrer inputs…
-
0
votes2
answers245
viewsA: Responsive does not work right
Do you need to use ul and li? Why not like this: <div class="row"> <div class="col-xs-4"> <div class="row"> <div class="col-xs-12 lipostagem"><a…