Posts by RickPariz • 598 points
38 posts
-
2
votes2
answers436
viewsA: How to insert DIV with input fields inside the DIV using jquery or javascript
const adicionar = document.getElementById("adicionar"); const ingredientes = document.querySelector("#ingredientes"); adicionar.addEventListener("click", function (event) { let div =…
-
1
votes1
answer527
viewsA: Callback with Redux-thunk
Very simple friend, what you need to do is return one promise after all executions of your flow. First, in your action, after the request and the call from dispatch, create a promise. Example:…
-
2
votes1
answer41
viewsA: How to return an sql answer?
Very simple friend. Having your ResultSet in hand, all you have to do is make a simple if in the method next() his. Example: if (rs.next()) { // Autor encontrado } else {…
-
0
votes2
answers99
viewsA: Problem respecting grids, adding fields dynamically
Simple friend, taking a look at the link you made available I noticed that you made a: let container = document.getElementById('people-container'); let div = document.createElement('div');…
-
1
votes7
answers4789
viewsA: Force input with a dot instead of an html comma
I have a simple solution for you friend, do not limit yourself to the point or comma, you should think about the user experience with your platform. There is a lib calling for Mask js, it serves to…
-
0
votes1
answer125
viewsA: Crud with Edit inside the Own table and search for data + database
There is a lib called Bootstrap Table, i use in all my projects, I think it is well documented and easy to use, there is an extension of it that has exactly what you want here. I will leave an…
-
0
votes1
answer87
views -
3
votes5
answers1555
viewsA: How to display DIV if radio is marked?
$('input:radio[name="consulta"]').change(function() { if ($(this).val() == 1) { $("#m1").attr("hidden", false); $(this).attr("checked", true); $("#m2").attr("hidden", true); $(this).attr("checked",…
-
1
votes1
answer455
viewsQ: json_encode returning empty
I am performing a basic query in the bank, using the following code: public function searchAllProducts(){ $array = array(); $select = $this->connection->prepare("Select * from tb_produto");…
-
0
votes1
answer406
viewsA: Bootstrap-Table Jquery How to edit a column individually in the table load event?
Simples Rafael. First you will make a function, which stylizes the column, which will be run independently if there was a update, insert etc, so come on, I’ll give you an example. Imagine that there…
-
1
votes1
answer1610
viewsA: Create action on an html button
Very simple. Sem Jquery: var btn= document.getElementById('id-do-botao'); btn.addEventListener('click', function(e){ // função aqui }); With Jquery: $("#id-do-botao").on("click", function(e){ //…
-
3
votes2
answers1704
viewsA: Take PHP variable and display in input
This is a very simple thing to do, using asynchronous requests (ajax), well come on.. Ajax is the use of the Xmlhttprequest object to communicate with server-side scripts. What makes the ajax a…
-
0
votes1
answer496
viewsA: List Login User Post
Simple friend, you will use the clause where of mysql, in your Function. function listaPostagemDoUsuario($conexao, $id){ $postagens = []; $query = mysqli_query($conexao, "select * from postagens…
-
0
votes1
answer260
viewsA: Java filter for specific pages
Very simple friend, in the Database, you will have to save the type of a user, administrator, or client. When you put the user in the session, make sure that their type is set, in the filter you…
-
1
votes1
answer195
viewsQ: Mysql connection to Laravel 5.0
I’m making the connection to the database mysql with laravel using the following code in the archive database.php 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'),…
-
1
votes2
answers2006
views -
1
votes2
answers529
viewsA: Printar content in list format with jquery ajax
Simple friend, assuming your json (resultado) return a list with data, just use the function each and the prepend(). <textarea name="bin" id="bin_id" rows="10" cols="40"> </textarea>…
-
1
votes1
answer282
viewsA: How to make one page transparent above another? com php
Simple friend, just you create a div that will be loaded over all content, these things are well used with loads. Let me give you an example: $(document).ready(function() { $(".loader").hide();…
-
2
votes2
answers526
viewsA: How do I print jquery results in a div?
Simple, first create a span or div under your textarea with some id. <span id="msg"> </span> Within the function success you can use the function text() selecting the span: success:…
-
0
votes1
answer183
viewsA: How to encrypt in the Java Web project
You can use the lib Bcrypt. // criptografando password = BCrypt.hashpw(password, BCrypt.gensalt()); // verificando se são a mesma senha BCrypt.checkpw(password, userCheck.getPassword(); // retorna…
-
1
votes3
answers1010
viewsA: Upload with ajax and java
I am answering my question, because in the future someone may have the same doubt, or want to know how to upload files with Ajax and Java 1 - Add Html <form id="form" action="upload"…
-
0
votes3
answers1010
viewsQ: Upload with ajax and java
I am doing an image upload with ajax (already tested without ajax and it worked). JS: $("#upload").on("submit", function(e) { e.preventDefault(); $.ajax({ url: $("#controller").val(), type: "POST",…
-
0
votes3
answers706
viewsA: Read a Json object with javascript
To access " Attributes " of ajax return is simple, you just need to put a variable in parentheses ( json ) the method used, and access with .nomeAtributo. Example: $.ajax({ url: url, type: "POST",…
-
1
votes1
answer75
viewsA: Calculate the sum of 02 fields automatically
Using Jquery: Use the Blur function, this function is activated when exiting the selected input.. $("#valor").blur(function(){ var receita = $("#numAlunos").val() * $(this).val();…
-
2
votes2
answers3119
viewsQ: How to perform a Js function when selecting a radio input
My question is simple, how can I run a java Script function, as soon as a radio input is selected ?
javascriptasked RickPariz 598 -
0
votes1
answer1354
viewsQ: Convert Json to Array with Jquery
I’m making an ajax request with jquery and Php like this: // arquivo php $json = array( "status"=>"true", "message"=>"inserido com sucesso" ); echo json_encode($json); . // arquivo js $.ajax({…
-
4
votes5
answers1088
viewsQ: Digits in a java string
How do I find out how many digits a java string has ? For example, user entered with "exemplo123", the string has 3 digits. I’m using this function but it’s not working: private static int…
-
0
votes2
answers240
viewsQ: JDBC, query returns false but saved in database
I am running the following java function: public boolean insert(User user) throws SQLException{ String sql = "insert into usuarios (nome, email, senha) values (?,?,?)"; PreparedStatement instruction…
-
2
votes1
answer771
viewsQ: Fibonacci sequence
I need to do an exercise on the Fibonacci sequence: Each new term in the Fibonacci sequence is generated from the sum of the previous 2 terms. If we start with 1 and 2, the first ten numbers will…
-
1
votes1
answer421
viewsA: Replace id by table name
Hello, good, you want to do a somewhat complex search in your database, using the student and computer id to refer to their respective tables, taking their name. For this you should do a somewhat…
-
2
votes1
answer925
viewsA: Force a click on a tag a with Jquery
I got it guys, it was simple : $(li).click(function{ $("li > a")[0].click(); }); I answered my own question because someone might have the same doubt one day.…
-
0
votes1
answer925
viewsQ: Force a click on a tag a with Jquery
I want when mine <li> be clicked, it activates a click on the tag <a> that’s inside of him. <li class="tab card-panel z-depth-1 ativado historia hoverable"> <a href="#historia"…
-
0
votes1
answer356
viewsQ: Error with Mysql insertion with JDBC
I’m running this code: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the…
-
1
votes2
answers207
viewsQ: Problem with String Comparison Denial
A part of my code: // faça: do { System.out.println("Você deseja sentar na Janela (J) ou Corredor (C) ?"); opcaoSentar = leer.next(); // se a opção foi J if (opcaoSentar.equals("J")) {…
-
1
votes4
answers1061
viewsQ: How to take the units of a two-digit number
I need to get the units of a two-digit number with PHP. example: $num = 25; $dig1 = 2; $dig2 = 5;
-
0
votes4
answers1314
viewsA: Position div below other after browser decrease
A solution would be to use media queries, something like: @media screen and (min-width:600px) { /* Dizer aqui que o tamanho das divs devem ocupar uma largura de 100%, assim uma ficaria em baixo da…
-
1
votes2
answers29285
viewsA: How do I resolve the "Notice: Trying to get Property of non-object in" error?
Try calling $del->rowCount in if, instead of assigning to a variable, the error is in this. $count = $del->rowCount();// tirei isto if ($del->rowCount() > 0) {…
-
0
votes1
answer260
viewsQ: Problem with php url
I have a problem with my url, when I go to the pagina php-detailed. it shows in the url the id of the project being detailed, thus: http://localhost/opentag/project-detailed.php? id=14 When I go to…