Posts by Alan PS • 2,511 points
151 posts
-
0
votes2
answers1726
viewsQ: Average a group of results
I have a group of results and need to calculate their average, how do I do it in jQuery? The elements are already in variables and separated by classes, for example: deztotal = parseInt($this.find(…
-
2
votes2
answers24
viewsQ: Place first result with greater margin than the others
Hi, my question is kind of strange, I always put in css two ids for when I put a margin, the first with margin 20px and the second with margin 10px, I wanted to know if there is any way to do this…
-
2
votes2
answers2947
viewsA: How to sum the elements of the same class of a group of tables
I got it this way: Jsfiddle $('div').each(function() { var somatorio = 0; $('table', this).each(function (i) { var $this = $(this), janmembros = parseInt($this.find('.janmembros').val() || '0', 10),…
-
3
votes2
answers2947
viewsQ: How to sum the elements of the same class of a group of tables
Hi, I was given a correct answer in a very similar question, but it lacked this detail that I can not solve...how to add the elements of the same class of a group of tables... Example: Jsfiddle…
-
4
votes1
answer308
viewsQ: Add inputs in report with more than one table!
I’m generating a report and it has several tables. In jQuery I have to add 2 inputs from each table, the problem is that it only adds up the one from the first table. I tried to use the next(), but…
-
0
votes1
answer75
viewsQ: UPDATE only fields that are more than 0 characters long
Hi, I have a table with several inputs and I need you to update the fields with more than 0 characters, the ones with 0 or blank are the same as this! There’s some way to do it ? follows my code:…
-
0
votes2
answers485
viewsA: Open 2 windows and close one at a time
I found another way to do this also in gringo stackoverflow... https://stackoverflow.com/questions/24463658/close-2-modal-and-open-1-again/24465132#24465132 Jsfiddle: http://jsfiddle.net/RR9Z4/…
-
2
votes2
answers485
viewsQ: Open 2 windows and close one at a time
In fancybox I open two windows of the plugin and need to close one at a time... Example: when opening the first window only closes the first and when opening the second window only closes the second…
-
2
votes1
answer96
viewsQ: Filter first result
Have some way to filter in php the first result of a query ? Example: $query = mysql_query("SELECT * FROM teste2 ORDER BY 'id' DESC") or die(mysql_error()); while ($row = mysql_fetch_array($query))…
-
4
votes1
answer3098
viewsA: How to make a progress bar from PHP download
You can use the ajax function of jquery or the form plugin too, it is quite simple to use the plugin, try this: About ajax in jquery you can see more here: http://api.jquery.com/jquery.ajax/…
-
0
votes2
answers469
viewsQ: Nodejs or flash solution for streaming live video!
Hello, I have posted several messages on the subject but I have not yet achieved a definitive solution, I need to do streaming live video and that the player that will stream runs on any browser…
-
1
votes0
answers198
viewsQ: How to create an apache server on the live internet?
How to create an apache server on live internet ? I’m having problems because the connection ports are blocked on the live internet and wanted to know how to connect in apache somehow ??? EDIT: only…
-
1
votes1
answer226
viewsQ: How to run Node.JS on Openshift and Locally
How to run Node.JS in Openshift (https://www.openshift.com/)? Url of openshift: http://nodejs2-agenciadreamup.rhcloud.com/ Github: https://github.com/AlanPS/StreamBrasil/ How to run Nodejs locally,…
-
2
votes3
answers266
viewsQ: Pagination of Text
How to page a text with Jquery ? I have a large text of about 5000 characters and I need to make it stay in some 5 pages with option NEXT PAGE AND PREVIOUS PAGE, I searched and I can not find any…
-
3
votes2
answers13199
viewsA: How to force cache cleanup on my visitors' browsers
You can in PHP modify the page cache: <?php //Prevent page caching header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); ?> Or you…
-
4
votes2
answers124
viewsQ: How to use FOR-generated number in the name of a variable?
How to use FOR generated number in a variable name ? Example: for (var i = 0; i < 5; i++) { var teste[i] = "teste é " +[i]; } Example 2: for (var b = 0; b < 5; b++) { var teste[b] = "teste"; }…
javascriptasked Alan PS 2,511 -
0
votes2
answers449
viewsA: How to know that the file has reached the end with Filereader()?
I got results and I’m working on the system, the error was very simple, I was trying to run the function readFile3(); with the variable not set, I only had to put the function inside the $("#file").…
-
0
votes3
answers1367
viewsA: How to send my login and password via $.ajax
Hi, you can use this: var username = $("#username").val(); var password = $("#password").val(); $.ajax({ url: "teste.php", headers: {"Header-Teste": username, "Header-Teste2": password}, success:…
-
4
votes3
answers19918
viewsA: How to open a pop-up
Hi, in php I think it is not possible, but you can use javasript, follow the code: <a href="#" onclick="window.open('http://www.suapagina.com', 'Titulo da Janela', 'STATUS=NO, TOOLBAR=NO,…
-
2
votes2
answers449
viewsQ: How to know that the file has reached the end with Filereader()?
I’m making a system that when the file has just been read opens the next file, the files are MP3 and wanted to play a sequence of songs whenever one finishes. How to do this with Filereader()? I…
-
3
votes2
answers470
viewsA: Updating data from a div?
Use the function $.post jquery: $("#form").submit(function() { // QUANDO ENVIAR O FORM var login = $("#login").val(); // VALOR DO LOGIN var senha = $("#senha").val(); // VALOR DO INPUT SENHA…
-
2
votes1
answer94
viewsA: How to make so that when a person copies something from my site, go along to the clipboard "source: meusite.com"?
Use the code below (removed of this topic): function addLink() { var body_element = document.getElementsByTagName("body")[0]; var selection = window.getSelection(); var pagelink = '\n\nMai multe…
-
8
votes2
answers3245
viewsA: Record audio and stream live
After much research I got results using the Webrtc-Experiment (https://github.com/muaz-khan/WebRTC-Experiment) and (http://www.rtcmulticonnection.org/docs/). Server code:…
-
16
votes2
answers1907
viewsQ: How to work with websockets
I’m trying to use Websockets in PHP and Javascript and I’m confused, it uses the protocol Ws:// and wss:// and the server (hostgator) does not have these protocols enabled (I think!) and I can’t get…
-
0
votes1
answer112
viewsQ: How to send the blob in real time?
Have some way to send the blob to the server in real time (streaming)? I searched on sockets but did not have good results...
-
9
votes2
answers3245
viewsQ: Record audio and stream live
I need to record audio and broadcast live, I found that with HTML5 and Javascript/jQuery is possible and that has plugins that can help me. I’m wearing one of them, the Mediastreamrecorder and I’m…
-
1
votes2
answers2929
viewsA: Open tab after loading
Correcting your code: <style type="text/css"> body {overflow: hidden;} #bloquear {position:absolute;top:0;left:0;width:100%;height:100%; background:#333;} #conteudo {display: none;)…
-
4
votes1
answer613
viewsA: How to run cron job on the server
To run a php script by cron you use the following command: curl -s -o /dev/null http://dominio/pasta/script.php
-
0
votes4
answers1634
viewsA: Scroll with Jquery
Hi, you can use scrollTop in Jquery. Try this (WORKING) $("#elemento1").click(function(){ $('html, body').animate({ 'scrollTop' : $("#elemento2").position().top }, 1); });…
-
0
votes2
answers80
viewsA: Css in all php/mysql generated Ivs
I got it this way: PHP $query = mysql_query("SELECT * FROM bd) or die(mysql_error()); while ($row = mysql_fetch_array($query)) { echo " <table border=0 width=\"720\"> <tr id=\"div\"…
-
0
votes2
answers80
viewsQ: Css in all php/mysql generated Ivs
How to do when the mouse enters the div it increases the opacity to 1.0 and when it exits the div back to previous opacity Example: PHP/MYSQL $query = mysql_query("SELECT * FROM bd) or…
-
3
votes4
answers2291
viewsA: With Delphi, how can I disable the ESC key for all apps?
I found a solution!!! Disable Esc and : Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancode…
-
8
votes0
answers2453
viewsQ: How to disable key combination in windows by registry
How to disable keys CTRL, Alt, Del, Tab, , and ESC by the record of Windows 7 and 8? I can disable the key Esc but not the rest, follows example of the key Esc: Windows Registry Editor Version 5.00…
-
0
votes0
answers69
viewsQ: Disable the ESC key in windows with Visual Basic or Delphi
How to disable Esc on Windows via Visual Basic or Delphi? When the user is open program Esc is unusable, will not do action in any open program. Example: with the start menu open when I press Esc it…
-
5
votes4
answers2291
viewsQ: With Delphi, how can I disable the ESC key for all apps?
I need to disable the esc for all programs using Delphi. Probably the form has to be always active and I disable the key in a way similar to the example below. My code so far: procedure…
-
2
votes1
answer1097
viewsQ: How to lock keyboard in jquery?
How to lock the entire keyboard in jquery, especially the Esc key for full screen, I want you not to leave the fullscreen when pressing Esc. example: $(document).keydown(function(e) { if (e.keyCode…
-
3
votes3
answers543
viewsQ: Make a rest screen with Jquery
I need to make a rest screen, when the mouse stand still for a few seconds opens the div of rest, tried it unsuccessfully: <script type="text/javascript"> $(window).mousemove(function(event) {…
-
3
votes1
answer3011
viewsQ: How to validate date of birth between the year 1900 and Today?
Validating date of birth with 3 fields? I have the field "data1" with the day, "data2" with the month and "data3" with the year, I need to validate the date of birth. These 3 fields come from a…
-
7
votes2
answers1386
viewsQ: Mail function and its limits
I am developing a tool to send bulk emails to a list of 20,000 emails, and the script is this: <?php $path = "listas/lista1.txt"; $ponteiro = fopen ("$path", "r"); $conteudo = fread ($ponteiro,…
-
1
votes2
answers1655
viewsQ: Close Download Dialog Box
How do I close a download window with jQuery in the Internet Explorer? Example: <?php $arquivo = $_GET["arquivo"]; header("Location: $arquivo"); echo "<script> $(window).ready(function() {…
-
-1
votes2
answers402
viewsQ: Alternative keyboard in input text
How to make a key work only in text type fields when pressed ? Example: $(":text").keydown(function(e) { e.stopPropagation(); }); here missing the textarea: if (e.keyCode == 70 &&…
-
5
votes1
answer1506
viewsQ: Disable keyboard in some fields
I need to make the letter f only work in text fields, in other places it does not work, example: $(document).keyup(function(e) { if (e.keyCode == 37) { return false; } });…
-
2
votes3
answers88
viewsQ: How to always leave 20px margin at the bottom of the page?
I have the CSS on body: margin-bottom: 20px; But always Uga, for example, if I use position: absolute; he loses that margin of 20px. How to do it in other ways?…
-
-1
votes1
answer597
viewsQ: How do Preload large images?
I have a background of 2mb to do Preload and do not know how to do... I have tried the basics, for example: $ ("#image"). load (function () { }
-
0
votes4
answers477
viewsA: Height of one div based on another div
I already decided, I had to change the height by css, so oh: $('.slimScrollDiv').css('height', '500px'); slimscroll uses this class and can change the height like this…
-
0
votes4
answers477
viewsQ: Height of one div based on another div
How to leave the div result777 the same size as the div publicidade? <script> $( "#result777" ).load(function() { if ( $("#publicidade").height() == "390px"){ var altura3 =…
-
6
votes1
answer73
viewsQ: Height of div no load
How to leave the field at 2 divs about the same height as #result4 that I gave a load? <script> $(document).ready(function() { $( ".buscascript<?php echo "$row[id]"; ?>"…
-
1
votes2
answers237
viewsA: How to add the fadein effect to this image transition code
Try using the Jquery Backstratch plugin.... is very simple and does it in a responsive way... http://srobbin.com/jquery-plugins/backstretch/ to use it is like this, you download the plugin which is…
-
-1
votes1
answer218
viewsQ: jQuery - how to measure the load time of an image in the background
How to run code when an image used as background is loaded? I tried to : $ ('#IDdaImagem').on('load', function () { / / 'Código parágrafo CARREGAR uma page / Conteúdo' }) and does not work the image…
-
3
votes3
answers853
viewsQ: MYSQL How to order this date field
I have a date field with all separate date and need to put in order as I do.. follows example that this not working... $query = mysql_query("SELECT * FROM `mensagens` ORDER BY `ano`,`mes`,`dia`…