Posts by Guilherme Lopes • 495 points
20 posts
-
0
votes1
answer61
viewsA: Select menu link
Test by taking the href attribute from the rendered link this way: $(document).ready(function() { $('ul.form li a').click( function(e) { e.preventDefault(); // prevent the default action…
-
1
votes1
answer150
viewsA: Show data from my site on other sites
As suggested I am formalizing the answer: Test this way: $("#divTestArea2").load("http://meusite.com/paginadedados #dados", function(){ $("#divTestArea2").css("atributo_css", "valor"); });…
-
1
votes4
answers9024
viewsA: How to make the 'focusout' event an input?
So that when you click on the label, go to the input, need to name the id, as the same as for, example: <label for="pesquisar"> Buscar </label> <input type="text" id="pesquisar">…
-
0
votes4
answers114
viewsA: How to make a query that returns the last record of each day?
I believe you will need to search for different days and order the date would look like this: SELECT DISTINCT DAY(data) as dia, t.* FROM tabela t ORDER BY data DESC
mysqlanswered Guilherme Lopes 495 -
1
votes3
answers818
viewsA: How to configure a dynamic dimension div delimited by other div’s?
I don’t know how the behavior of DockStyle.Fill, but you could do something like that: HTML: <div id='header'></div> <div id='content'></div> <div…
-
3
votes1
answer766
viewsA: Update with Select
The problem is because Mysql does not allow you to update a table and use it to define the criteria for update. I think this might solve your problem: update actor set salario = salario * 1.1 where…
-
3
votes2
answers63
viewsA: Date formatting is changing its parameters
Here is an implementation for date that will possibly solve your problem: public function beforeSaveData($data) { $data = explode("/", $data); $novaData = $data[2] . "-" . $data[1] . "-" . $data[0];…
-
1
votes1
answer143
viewsA: Multiple selection does not work in IE
Hello, I guess I didn’t need all this, test it with this code: $('#ddl_autorizacaoprevia option:first-child').click(function () { $('#ddl_autorizacaoprevia option').each(function () {…
-
0
votes1
answer551
viewsA: Dompdf class Dompdf
Hello, test like this: // Importa arquivo de config da classe DOMPDF require_once 'bower_components/dompdf/dompdf_config.inc.php'; // reference the Dompdf namespace // use Dompdf\Dompdf; //…
phpanswered Guilherme Lopes 495 -
7
votes6
answers8595
viewsA: javascript loop with Sleep
Hello you can use this way, var i = 0; var loop = setInterval(function(){ console.log("valor de i="+i); if(i == 10){ clearInterval(loop); } i++; }, 1000);…
javascriptanswered Guilherme Lopes 495 -
1
votes1
answer128
viewsA: Pass GET parameter through AJAX to activate page
This is happening, probably because the last parameter p is with the url p=vinculo.php?c=MEMBR, and there’s a ?, which means that will begin the part of queryString, however this part has already…
-
2
votes2
answers655
viewsA: Mysql reserved keywords
It’s not good practice, but I think the only major inconvenience you’re going to have is having to wear mufflers, like "default" or between backticks -> `
-
3
votes3
answers1367
viewsA: How to inform that a particular store is open at that time
As commented this is not the most correct to do because when you get the time with javascript, you get the time of the user/client computer, but answering your question, you could do so: In html:…
-
1
votes2
answers2413
viewsA: Ajax does not work - send PHP data without refresh
so that no refresh on your page failed to pass the event parameter, follows the code: $(document).ready( function(){ $("#textoResp").submit( function(ev) { ev.preventDefault(); $.ajax({ type:'post',…
-
1
votes2
answers57
viewsA: Print next days after 18/01/2016
Hello, that should do it: for ($i=1; $i <= 5; $i++) { $proximosDias[] = date('d/m/Y', strtotime(" +$i day")); } The result of this will be: array(5) { [0]=> string(10) "19/01/2016" [1]=>…
-
0
votes1
answer1203
viewsA: Doubt about window.location.href()
Hello, I’m not sure I quite understand your question. But when loading a new page, the current document is closed and starts loading a new document. Any code in your current document will no longer…
-
2
votes1
answer162
viewsA: Codecademy Javascript error
Hi, I think I’d look like this: var text = "my name is Emerson"; var myName = "Emerson"; var hits = []; for(i=0; i< text.length; i++){ if(text[i] === myName[0]){ for (var j = i; j <…
javascriptanswered Guilherme Lopes 495 -
1
votes1
answer490
viewsA: Using dynamic combobox how to send the id to server automatically without using the Submit button and return all values where id is equal?
Hello, I don’t know if I understand it very well, but you will need to use ajax to send a request dynamically without clicking the button. You will also need to generate the table with javascript.…
-
0
votes3
answers245
viewsA: Resolver undifined index
Hello, first indication that it does not use accents, cedilla and spaces in its database for good practices. To solve this problem, give a var_dump($row) within the loop while to see how the fields…
-
1
votes1
answer818
viewsA: Image in Database with Input File
Hello, first, because it is a form that will send files to the server, it is necessary that the form has the attribute enctype -> enctype="multipart/form-data". for being a file of type "file",…