Posts by Francis Vagner da Luz • 461 points
60 posts
-
0
votes1
answer79
viewsQ: Add data from database
I am using this function to search for a field in a table: function rendimentoDia($conexao, $dia) { $rendimentos = array(); $resultado = mysqli_query($conexao, "select valor from hospedes where dia…
-
-1
votes2
answers809
viewsQ: send url with parameters in the Whatsapp api
I need to pass a url with a variable through the Whatsapp api: $id='3'; $link = "clique neste link para validar sua conta site.com.br/usuario.php?id=$id"; header("Location:…
-
0
votes2
answers26
viewsQ: Check field on the bank
I’m doing a search in the bank to see if the amount sent already exists in it. This is the function I’m using: function buscaSubdominio($conexao, $nome_subdominio){ $query = "select * from…
-
0
votes1
answer69
viewsQ: error importing module
I have this module in a file called timer.js module.exports = { iniciar(){ console.log('oi'); } } I am trying to import this module into the index.js file as follows: const timer =…
javascriptasked Francis Vagner da Luz 461 -
0
votes0
answers44
viewsQ: Put a button to download a svg
I’m tagged: <svg id="codBarras"></svg> In it is created a barcode in SVG for me. I need to know if there is a way to download this image through a button. If there is, as I do in pure…
-
0
votes1
answer31
viewsQ: Listen and perform action
Assuming I have a tag where values are changed commonly on my page, example: <p id="valor"></p> What I have to do in javascript without jquery to listen to this change all the time and…
-
1
votes1
answer47
viewsQ: Select buttons in a map
I’m trying to put click events on a list I get from an API. This is the return response to status 200. In it I mount the buttons: if (xhr.status == 200) { let exercicio = xhr.responseText; exercicio…
javascriptasked Francis Vagner da Luz 461 -
1
votes1
answer30
viewsQ: Dynamically build page with PHP
I need to display different pages according to a value that comes through the URI, I did this code, is not pointing errors, but also does not display the contents of H1. <?php…
phpasked Francis Vagner da Luz 461 -
0
votes1
answer4481
viewsQ: Flex line break
I have a list of videos that I display on my screen dynamically with java script. It’s a div tag that has the videos class. However the list does not break line when the size exceeds the size of the…
-
0
votes1
answer20
viewsQ: Verify user
I want that when the user logs in to my page, javascript checks his profile on the system and if the profile is empty, it directs to the home page. It’s simple, I’m trying this code here, but it’s…
javascriptasked Francis Vagner da Luz 461 -
1
votes1
answer35
viewsQ: Calling a page update function
I have the following HTML that calls a Javascript function: <div> <button id="avancar-aula">Avançar aula</button> </div> <script src="js/avanca-aula.js"></script>…
javascriptasked Francis Vagner da Luz 461 -
0
votes1
answer164
viewsQ: Prevent the browser from filling in the email and password field
When you add the password and email value in the type of an input, the browser changes the background of this input to the yellow color and fills the user data automatically. Is there a way to…
html5asked Francis Vagner da Luz 461 -
0
votes0
answers32
viewsQ: Condition the selection of an ID
I have the following AJAX function: function exibeUltimaAula(){ let montaAula = { idUsuario: document.querySelector('#id').textContent, token: document.querySelector('#token').textContent, id:…
-
0
votes1
answer306
viewsQ: function is not defined
This code was working without showing me any errors. Then I put a setTimeOut, it keeps working, but gives a boring error in the browser log, saying that the function is not set. I must be putting…
-
0
votes1
answer849
viewsA: Div on top of image
I made this simplified file here and it may help you, Html: <figure class="artist-photo"> <img src="img/01.jpg" alt="Ed Sheeran"> <div class="info-container">…
-
0
votes3
answers70
viewsA: For in an AJAX array
I did it this way and it worked: if(xhr.status == 200) { let aulas = xhr.responseText; aulas = JSON.parse(aulas); let x = document.querySelector('#videos'); aulas.map(item => { x.innerHTML +=…
javascriptanswered Francis Vagner da Luz 461 -
0
votes3
answers70
viewsQ: For in an AJAX array
I receive data from an API with an array and parse it with pure js. This array returns me more than one object that I’m currently only displaying in the browser’s.log console. I don’t know how to do…
javascriptasked Francis Vagner da Luz 461 -
0
votes0
answers44
viewsQ: Problem loading fonts when uploading the site to the server
I am using some fonts that I have stored inside a folder on my system. When I run the system locally there is no problem, but when I upload the server to the server (Amazon) the sources stop being…
-
0
votes1
answer33
viewsQ: How to refresh the page and stop updating?
I’m making the following code: if(xhr.status == 200){ console.log(xhr.responseText); window.location.reload(); } only when I do this, it feels like it enters an eternal loop and crashes my server.…
-
0
votes0
answers20
viewsQ: Error while capturing existing data
I have two AJAX services. In one of them I search the user data in a JSON that an API returns to me, I parse it and ask it to insert a certain data for me in a tag . The code is this: if(xhr.status…
-
1
votes1
answer789
viewsQ: Pick up dynamically created element
I am generating a dynamically A tag in a pure AJAX file, without Jquery. The code: if(xhr.status == 200){ console.log(xhr.responseText); let resposta = xhr.responseText; resposta =…
-
1
votes2
answers113
viewsQ: Action using select
I have a select <select class="select-sala" id="selecionar-aula"> <option value="">Pagina 1</option> <option value="">Pagina 2</option> </select> What I need is…
-
2
votes2
answers537
viewsQ: View code on page
What tag do I use to display any code on the page? That is, how do I display codes PHP or any other on the page in such a way that the browser reads it as text and does not interpret it as code?…
-
0
votes0
answers24
viewsQ: Action during browser scrolling
I have the following HTML: <section id="rolagem"> <article id="item1"> //conteúdo </article> <article id="item2"> //conteúdo </article> <article id="item3">…
-
0
votes2
answers1162
viewsQ: How to put a java script into value html
I have some variable: let variavel = x; and I have the input: <input type="text" value=""> There is a pure javascript way to take a variable or some javascript code and put html tags? In this…
-
0
votes1
answer35
viewsQ: How to mount on the received data page via get
I have this line which is a part of the code I’m using to send the data through the URL: <a href="curso.html?id=' + item.id +'&descriacao=' + item.descricao + '" class="a-item">'+…
javascriptasked Francis Vagner da Luz 461 -
0
votes0
answers21
viewsQ: How to do two sessionStorages
I am making a test system with an API and I am using pure javascript for integration via AJAX. I am storing the data in local and sessionStorage to transit between pages. My problem is the…
javascriptasked Francis Vagner da Luz 461 -
1
votes1
answer29
viewsQ: Show data dynamically
I have this ajax that requests a list of names for me.. this is the code in pure javascript: function listagem() { var lista = { idUsuario: document.querySelector(".campo").value, token:…
javascriptasked Francis Vagner da Luz 461 -
0
votes2
answers76
viewsQ: Data processing
I am receiving in json a category list that has the id data and name. I make restful in pure javascript and can already view the data in the browser console, I am using this code: if (xhr.status ==…
javascriptasked Francis Vagner da Luz 461 -
0
votes1
answer98
viewsQ: use classList.add
I have two conditions in a pure javascript code; if the request sent via restful was received by the service I show on the screen a sentence in green color, if not, another sentence in red color.…
javascriptasked Francis Vagner da Luz 461 -
-1
votes3
answers47
viewsQ: Getting text from an element
I’m trying to do a basic validation in pure javascript. works as follows; I have a <h1> where the user profile is informed and I need to check the text, as an example: <h1…
javascriptasked Francis Vagner da Luz 461 -
0
votes1
answer51
viewsQ: Variable taking all TAG values
ma API is returning me a token. I get this value in my html in a div with the id token. Then I create a variable in my javascript to capture the value of this div, ie, var variavel =…
javascriptasked Francis Vagner da Luz 461 -
0
votes0
answers42
viewsQ: Fetch the returned value via REST and insert into an input
I’m searching, via Restful, the value of id of a user registered in an API. Now I have to enter this value in a input HTML. I’m trying this way: I capture the value of the variable in a tag…
-
0
votes3
answers1659
viewsQ: Set a variable in the value of an input
I have a variable, for example: let exemplo = document.querySelector("#id"); I want to ask the value of this variable and put in the value of a input HTML: <input type="text" valeu="receberia o…
-
0
votes1
answer181
viewsA: Capture and parse a Torage location
I already solved That’s all you could do: var usuario = window.localStorage.getItem('usuario'); usuario = JSON.parse(usuario); console.log(usuario); var id = ""; id += usuario.id;…
-
0
votes2
answers406
viewsA: Do not send email with PHP Mailer
So I think you also need to import the Phpmailerautoload.php file. I always use this code here and it works, try it... <?php session_start(); $nome = $_POST["nome"]; $email = $_POST["email"];…
-
0
votes1
answer181
viewsQ: Capture and parse a Torage location
I’m looking for data from an API to log in to a page. To log in I need to use the POST method, but it returns the user data already registered. So I’m storing this data in an Storage location to…
-
0
votes1
answer318
viewsQ: carry data to another page
I’m frontending a login system and I’m using pure javascript for it. I can already log into the browser API and console to receive the data from the user who is logging in. This is my AJAX: function…
-
0
votes3
answers27822
viewsQ: Show/Hide with CSS only
What CSS do I have to do to show or hide the elements of <div id="mostra"> by clicking the Show/Hide button on <div> fetch? This is my HTML: <div> <div id="mostra"> <input…
-
0
votes1
answer1055
viewsQ: Download images
I have the following code: <section class="margem-base-80 coluna sombra-suave" id="recipiente-topo"> <h1 class="margem-topo-50 recipiente letra-branca">Gerar QRcode…
-
0
votes0
answers280
viewsQ: Hide notice in PHP
My problem is this. I have the variables $qr1, $qr2 and $qr3, as you can see in the code below, which are only valid when I send the data via post. But I need them to be hidden so the user doesn’t…
phpasked Francis Vagner da Luz 461 -
1
votes1
answer192
viewsQ: PHP Qrcode how to make it bigger
I am generating a Qrcode through lib phpqrcode. I know you have the sizes L, H and others. But, are there ways to make the image bigger using other settings? Because, even on H is small for my need.…
-
3
votes3
answers41
viewsA: Turn into function
So I got it here. I did it this way: //Função function dadosUsuario($id, $conexao) { $resultado = mysqli_query($conexao, "select * from usuarios where id= {$id}"); return…
phpanswered Francis Vagner da Luz 461 -
2
votes3
answers41
viewsQ: Turn into function
I have this code that brings the user data in my database: $resultado = mysqli_query($conexao, "select * from usuarios where id= {$id}"); $dado = mysqli_fetch_assoc($resultado); echo $dado['nome'];…
phpasked Francis Vagner da Luz 461 -
2
votes1
answer116
viewsQ: How to fit these elements?
I would like to know how to fit this element, I would like when the top end the bottom come right down to it. How can I do that? Here is the html: <?php $postagens = timeline($conexao);…
cssasked Francis Vagner da Luz 461 -
-2
votes1
answer319
viewsQ: Compare two emails at registration time
I have a registration form. There are also two fields that are email and confirm email. How do I see if the two emails are equal in php and display an error message if they are not equal?
-
-1
votes3
answers203
viewsA: Problem to send PHP data to database
<?php $titulo = $_POST ['titulo']; $texto = $_POST ['texto']; $conexao = mysqli_connect("localhost", "root", "", "blog"); echo "Sucesso"; mysqli_query($conexao, "INSERT INTO postagens…
-
-1
votes1
answer5475
viewsQ: Recover password in PHP
I made a simple system to recover password. The system is working normally, but when the user clicks on the confirmation email, his email appears in the URI, what do I do? Here’s the code: This is…
phpasked Francis Vagner da Luz 461 -
2
votes1
answer1444
viewsQ: How to get the value of a field on the same page
I have a form field on a page called register.php, for example. So I want to create a variable that receives the value that the user enters in this field, but I want this variable to be in the same…
phpasked Francis Vagner da Luz 461 -
0
votes1
answer55
viewsQ: What’s wrong with this code?
Here’s the code: $aniversario = $_POST['aniversario']; $dataAtual = date("Y/m/dd"); $noRobot = $dataAtual - $aniversario; echo $noRobot; That is the error: Notice: A non well Formed Numeric value…
phpasked Francis Vagner da Luz 461