Posts by Jader A. Wagner • 4,921 points
176 posts
-
0
votes3
answers71
viewsA: Wrapping part of a string
Or the uncomplicated way: $('.carousel .item .carousel-caption h2').each(function(){ $(this).html( $(this).html().replace(':', ':<span>') + '</span>' ); }); Or with verification of the…
-
1
votes2
answers192
viewsA: jQuery Date "Invalid Date"
Just remove the milliseconds that works on IE, FF, and CH: var countTo = new Date("9 July 2015 14:30:00"); alert(countTo);
-
0
votes3
answers319
viewsA: How to display an ajax error through a url?
In fact you are displaying an error message using jquery and not ajax, as there is no ajax request to the server requesting such a message. Then follows below an example function to take the…
-
1
votes3
answers795
viewsA: creating a group of random numbers that are unique
just go including the numbers in an array, checking first if it no longer exists in it. $sorteados = array(); for($i = 0; $i <= 1000; ++$i) { do { $nr = rand(1000,10000); } while…
phpanswered Jader A. Wagner 4,921 -
1
votes1
answer52
viewsA: Grid Boolean Array
From what I understand you created the variable grid_type to control if the block has already been clicked, but it marks only the row, you must add within each row an array to register also the…
-
1
votes1
answer1114
viewsA: Show a div and hide another in Hover
You are hiding the element that is firing the Hover... I think it must be something like this: jquery: $( ".produtosDestaqueBoxItem" ).hover( function() { $( this…
jqueryanswered Jader A. Wagner 4,921 -
1
votes1
answer743
viewsA: Play an audio every time the BD changes
do something like this in Reload: <script> var $scores = $("#scores"); var $a = "<?php Print($numA); ?>"; setInterval(function () { $scores.load("index.php?numA_anterior=<?php echo…
-
1
votes1
answer1090
viewsA: "Warning: Cannot Modify header information - headers already sent by"
Taken from: Solving the problem of "headers already sent" Solving the problem of "headers already sent" One mistake that many beginner programmer end up coming across there is the famous "Warning:…
phpanswered Jader A. Wagner 4,921 -
1
votes2
answers170
viewsA: How to run all files inside a Folder
Removing from the OS en How to run Multiple . BAT files Within a . BAT file I think it would be something like this: FOR %x IN (*.mp3) DO call player-mp3.exe "%x" where you would have to have in the…
-
3
votes3
answers1758
viewsA: Do I need to insert an HTML tag with jQuery to encapsulate the code below?
The simplest way to do it would be like this: $("#main_div").append( '<div id="pegatudo">' + '<div class="Ftitulo">'+item.titulo+'</div>' + '<div…
-
3
votes5
answers22327
viewsA: Simple Rotary Banner
I needed a slider the other day, and the best and easiest I could find was this: Flexslider jquery: // Can also be used with $(document).ready() $(window).load(function() {…
-
1
votes1
answer214
viewsA: Filter search does not work
try to standardize your code, because in one part you use mysqli_ functions and in another use objects, and these details end up causing headache and difficulties in finding the problems. copying…
-
1
votes1
answer141
viewsA: Center two Ivs with text
Understand that if you do not set a width for the div and set as float: left;, it will be the size of its content, so there’s no way to center if there’s no room left for it... Another problem is…
cssanswered Jader A. Wagner 4,921 -
1
votes1
answer130
viewsA: Portfolio organization by categories
If you use a table structure like in the model below, I think you can easily query all product categories and get the class of each one... Table categories: CREATE TABLE IF NOT EXISTS `categorias` (…
-
1
votes2
answers651
viewsA: How to use onload on DIV elements?
depending on the operations you want to do with the (s) element(s), the ideal is to use $.each so that you can reference each of them with $(this) or with the variables of the parameters. Ex:…
-
1
votes3
answers3696
viewsA: Merge arrays in php
Assuming the variables are synchronized to each other, then they will never have different quantities, predicting this just do: $name = [0=>'name1',1=>'name2']; $email = [0=>'email1',1=>…
-
5
votes4
answers3461
viewsA: How to center a rectangular image on a square div
This is easier to do if you know the exact measurements of the image, so you can calculate the leftover, divide and put as negative margin, but using a percentage also works relatively well: CSS…
-
0
votes2
answers8678
viewsA: Receive responses from jQuery’s Ajax request
I usually do like this: jquery: $.ajax({ type: "POST", url: 'url_especifica', data: {variaveis: variaveis}, success: function (result) { if (result.substring(0,7) == 'sucesso') {…
-
2
votes3
answers451
viewsA: PHP execution via Ajax jQuery
To check a set of actions I prefer to use the switch, I think it is easier to understand and modify the instructions... switch ($_POST['send']) { case 'buUserBloqueia': // Esta função bloqueia um…
-
0
votes1
answer681
viewsA: How can I update a mysql blob field using php
I don’t particularly like to repeat code, so when I can, I condition only the affected part: if(isset($_POST['submit_edit'])) { $titulo = $_POST['titulo']; $texto = $_POST['texto']; $query = "UPDATE…
-
1
votes3
answers158
viewsA: preg_replace_callback does not work
That’s how it worked right here: $replacements = array( '[PEDIDO]' => $oID, '[NOME]' => $order->customer['name'], '[VALOR]' => $order->totals['ot_subtotal'], '[FRETE]' =>…
-
3
votes6
answers73010
viewsA: I installed XAMPP but can’t start apache, Error: Apache shutdown unexpectedly
to know exactly what is listening to port 80 (or any other port) run cmd as administrator, and type: netstat -anb in the example below, apache.exe is listening to port 80 on all machine Ips.…
-
1
votes4
answers107
viewsA: How to use ' inside an array?
try to add two more bars, as it is likely that the string to be analyzed is with addslashes or Magic Quotes... <?php ':\\\'(' => "choro.png", ?>
-
2
votes4
answers912
viewsA: Behavior of the function preg_match() for short names
Your question has been answered, but you are predicting that the data will always come formatted as you want, ie names and surnames with the first uppercase and connective in lowercase... thus…
-
1
votes2
answers1779
viewsA: How to add a class to a <li> when the person is on the link page accessed?
I think something like this is more practical: <?php $pagina_atual = basename($_SERVER['PHP_SELF']); ?> <ul id="menu" class="clearfix"> <li<?php echo ($pagina_atual == 'index.php'…
-
2
votes1
answer1593
viewsA: Records are duplicating when entering in the database
You are running curl_exec($ch) twice; I think the last function should be curl_close($ch); <?php $ch = curl_init(); $data = array('acao'=>'1', 'dados'=>array('nome'=>'Alisson Acioli',…