Posts by Rafael Augusto • 4,027 points
242 posts
-
3
votes1
answer1179
viewsQ: Convert data with Javascript?
How do I convert the date to this type 02 Ago 2017 for 02/08/2017? I’m using the vuejs-datepicker and when selecting it comes in this format, and the documentation says to do so...…
-
2
votes1
answer367
viewsA: How to send JSON to PHP?
A simple example, that would be... var objArr = [] for(let i = 0; i < 20; i++){ objArr.push(i) } console.log(objArr) $.ajax({ type: 'POST', url: 'SUA URL', data: objArr, success: function(data){…
-
3
votes1
answer211
viewsA: Div Centralizada
.div{ width: 200px; height: 100px; background: black; margin: 0 auto; } <div class="div"> <img src="test.jpg"> </div> Follow an example.. After reading the comments above, follow…
cssanswered Rafael Augusto 4,027 -
3
votes3
answers1895
viewsA: Progress bar with css
Friend, the Html5 has an option for this *,*:before, *:after{ box-sizing: border-box } body{ background: silver; } .progress{ width: 100%; height: 20px; background: black; } .progress .status{…
-
2
votes1
answer235
viewsA: How to make a "balloon" effect on a menu?
.bubble:hover { position: relative; width: auto; height: 120px; padding: 10px; background: #000; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; } .bubble:after {…
-
0
votes1
answer9
viewsA: Doubt of ajax to create a JS page
$.ajax({ url: 'arquivo.txt', success: function(data){ $('#app').append(data) } }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div…
ajaxanswered Rafael Augusto 4,027 -
0
votes2
answers46
viewsA: Images within DIV’s - How?
.hello{ width: 100%; float: left; } .left{ float: left; } .left img{ width: 100px; } .right{ float: right } .right img{ width: 100px; } <div class="hello"> <div class="left"><img…
-
0
votes2
answers685
viewsA: How to align the close button of the pop-up window?
figure.pop-up-principal img{ position: fixed; width: 100%; max-width: 378px; max-height: 283px; margin: 0 auto; top: 0; bottom: 0; left: 0; right: 0; text-align: center; background: white;…
cssanswered Rafael Augusto 4,027 -
2
votes2
answers9256
viewsQ: Check if value exists in object array
I have an array which is as follows [ { "Param": 1, "Valor": 68 }, { "Param" 1, "Valor": 79 }, { "Param": 2, "Valor": 165 } ] I would like to know how to verify the number (no Valor) exists in the…
-
-1
votes1
answer58
viewsA: The site does not adapt to the mobile version
Use in your head <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-
0
votes1
answer182
viewsA: Stretched layout Jspdf
I found out it’s because of pagesplit: true, if I declare as false
-
0
votes1
answer520
viewsA: Jspdf problems with addHTML printing
Fortunately I managed to solve my problem, follow the solution code. $('body').css('overflow', 'visible') $('#app').css('overflow', 'visible') $('#pdfCarta').css('overflow', 'visible')…
-
0
votes2
answers788
viewsA: Jspdf error with Vuejs
After a lot of trying, I managed to solve my case, I’ll leave the code here for those who have the same problem as me. I thank those who tried to help me. $('body').css('overflow', 'visible')…
-
1
votes1
answer597
viewsA: Button Delete a line in DB
Your code is wrong, follow it corrected <?php if(isset($_GET['acao'])){ $del = mysql_query("DELETE FROM slider WHERE id = '$_GET['id']'") } $sql = mysql_query("SELECT * FROM slider");…
-
1
votes1
answer1279
viewsA: DIV Absolute respect padding DIV father
If I understand correctly, this is what you want. *,*:before,*:after{ box-sizing: border-box; } .pai{ position: relative; width: 300px; height: 300px; background: black; padding: 10px; } .filho{…
-
1
votes2
answers408
viewsA: multi upload php
For this you need to go through the array (use the Html5 Multiple) <input type="file" name="imagem[]" multiple> foreach($_FILES["imagem"]["tmp_name"] as $key=>$tmp_name){ $file_name =…
-
0
votes5
answers1042
viewsA: centralize a Nav menu
Follow the example nav{ width: 100%; float: left; } ul{ margin: 0 auto; width: 350px; list-style: none; } a { text-decoration: none; } .clearfix:after { display: block; content: " "; clear: both; }…
-
2
votes2
answers76
viewsA: How to redirect on first access another page instead of index?
Follow the example DirectoryIndex inicio.php
htaccessanswered Rafael Augusto 4,027 -
3
votes3
answers14308
viewsA: Adjust image to <div> size
I don’t quite understand what you want, but that would be it? .profile{ width: 60px; height: 60px; border-radius: 50%; overflow: hidden; } .profile img{ width: 100%; } <div class="profile">…
-
4
votes1
answer354
viewsA: 'querySelectorAll' does not work
As the friend had said up, to function, you will have to do so... let elemento = document.querySelectorAll('p') // Pega apenas o primeiro do array elemento[0].style.color = 'red'; // pega todos…
-
0
votes2
answers60
viewsQ: Replicate DIV, alter content?
I’m having a "certain" difficulty. I have a DIV that contains content that resembles a bill, all this content comes from an API (minus the div of course). However, I need you in the field…
-
0
votes1
answer369
viewsA: Htaccess Login and Password
To do this, you will create an authentication system (much like login system). Ex Basico: <?php if($_GET['url'] == 'arquivo'){ if(!$_SESSION['login']['auth']){ echo '<input type="text"…
-
1
votes2
answers788
viewsQ: Jspdf error with Vuejs
I’m having a problem trying to use Jspdf with Vuejs. I picked up a tutorial on the internet (this one) which shows how to print all the contents of a div (for it was not succeeding. However, in the…
-
0
votes1
answer520
viewsQ: Jspdf problems with addHTML printing
I’m having trouble using the addHTML Jspdf, technically everything is working, but it does not print all the content that is in my div that I defined, it only prints what I can see on screen.…
-
0
votes1
answer84
viewsA: Error in database connection
Follow an example Connection $mysqli = new mysqli($servidor, $usuario, $senha, $banco); if (mysqli_connect_errno()) trigger_error(mysqli_connect_error()); YOUR SELECT $sql = "SELECT * FROM usuario…
-
0
votes2
answers522
viewsA: Why is the navigation bar overwriting the header?
You can use a float: left in the header and give a margin-top: 124px; /*barra de navegação*/ nav { height: 124px; width: 100%; background: #c4322e; position: fixed; opacity: 0.6; display: block; }…
-
1
votes1
answer40
viewsA: store values and display them in another field
Opa, you can use Localstorage or Sessionstorage to store this and recover it later. Follow an example $('.tipo').on('click', function(){ sessionStorage.setItem('tipo', $(this).attr('data-tipo')); })…
-
2
votes1
answer114
viewsA: How do I leave user messages on different sides of the chat?
let mensagens = [ { 'mensagem': 'Olá', 'status': 0 }, { 'mensagem': 'Olá, Tudo bem?', 'status': 1 }, { 'mensagem': 'Tudo e você?', 'status': 0 }, { 'mensagem': 'Como vai a familia?', 'status': 0 },…
-
0
votes1
answer182
viewsQ: Stretched layout Jspdf
I started using Jspdf, and while my page has little content, everything goes smoothly, but if it is large, the layout distorts, someone knows why? Follow the image and the code below let doc = new…
-
1
votes3
answers7978
viewsA: Change`id` of <Form> javascript or jquery element
$(document).on('click', '#texto', function(){ alert($(this).attr('id')); $(this).attr('id', 'NewID'); alert($(this).attr('id')); }) <script…
-
1
votes1
answer73
viewsA: jquery ajax printa index on screen
Separate the files, create a PHP-only file. Ex: IP.php <?php $bin = substr($_POST['ip'], 0, 90); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "fonte dps testes"); curl_setopt($ch,…
-
0
votes4
answers1576
viewsA: Pass value to another page
Even following what you posted, you have two ways, one would be to go through a form, the other using jQuery (but I don’t think that’s the option you want). Follow the example <form…
phpanswered Rafael Augusto 4,027 -
1
votes1
answer1032
viewsQ: Recover select value with Vuejs
i have a form and would like in the field (which is a select) to return (selected) the value previously marked. Ex: if my selected is empty, the select will display values normally (1, 2, 3, 4). If,…
-
0
votes2
answers94
viewsA: How to better optimize the Mysql connection and information listing script?
Instead of using SELECT * FROM, you can use SELECT titulo FROM noticias, there is no reason to take all fields, and only use the title and etc. This way the search will be faster. I also advise you…
-
3
votes1
answer479
viewsQ: Dropdown Menu (VUEJS/Javascript)
I’m trying to make a dropdown menu in Vue (I don’t want to use Bootstrap-Vue), so I created a isActiveDrop and defined how true, and every time I click the button to open it is set to false, so the…
-
1
votes4
answers18367
viewsA: Applying opacity in a Background
Using RGBA, I always use it this way :D .img{ background: url('https://static.omelete.uol.com.br/media/extras/conteudos/01-Spoilers_fcaRwD9_4VjGalG.jpg') no-repeat center; background-size: cover;…
-
6
votes2
answers154
viewsA: How does the server know that the index is the main page?
It’s usually standard Apache, but you can change it in the file .htaccess <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all…
-
0
votes2
answers519
viewsA: JSON Javascript external file
You need to use HTTP protocol, there is no other way, but not to install Wamp, you may have Node installed on your machine and install the package http-server. this will provide you with an HTTP…
-
0
votes1
answer35
viewsA: insert comments without refreshing the page
For this you will have to use Ajax/jQuery, you can do it this way PHP. $sql = $pdo->prepare("INSERT INTO 'tabela' SET valor = valor") $sql->execute(); ARQUIVO.JS $.ajax({ type: 'POST', URL:…
-
2
votes1
answer164
viewsA: How to echo PHP to Ajax? Login System
You can take the returned value and use in ajax, example: $.ajax({ type: 'POST', url: 'SUA URL', dataType: 'html', success: function(data){ alert(data) } }); The date is echo you returned from PHP,…
-
0
votes1
answer47
viewsA: Make appmobile website available on playstore
You can use some means. Framework7 + Codova: Currently allows you to work with jQuery, Vuejs, Reactjs and even Angularjs (Especially is what I like the most). IONIC Framework: You use Angularjs (I…
-
2
votes2
answers737
viewsQ: Perform function after given time you have stopped typing (keyup) Vuejs or Pure JS
I’m trying to make that when I stop typing in the input, the system waits a second to do my search and return my result, but I’m not getting it. The system is being made in Vuejs <input…
-
9
votes1
answer332
viewsA: Google Maps Information Box with JS
Fortunately I managed to solve, for those who had the same problem I did, follows the updated code. function initialize(locations, string){ //Center var mapProp = { center: new…
-
7
votes1
answer332
viewsQ: Google Maps Information Box with JS
How do I display an information box when I click on Mark? I tried following the documentation, but when I click, the box appears but not the information inside it. //Center var mapProp = { center:…
-
1
votes1
answer136
viewsQ: Upload image with JS
Good afternoon, I’m trying to upload image using JS but I’m not getting, I’m not using jQuery, I’m using Axios. Until now, I tried that way var files = document.getElementById("inputPhoto").files;…
-
3
votes2
answers2148
viewsQ: CORS JAVA (ERROR)
I’m trying to connect to an API that was made in Java, but always error when trying to connect (I want to feed a mobile application, made in JS/Cordova). When connecting (via Browser) I can, the API…
-
1
votes2
answers2120
viewsQ: API works in POSTMAN, but not in code
I am trying to access an API, by Postman, it works and returns json normally, already by code (using Vuejs + Axios) does not return, from CROSS error, how can this? where Axios returns normally? let…
-
2
votes1
answer13343
viewsQ: ANDROID_HOME Linux Environment Variable
I am having problem with the environment variable ANDROID_HOME, whenever I try to run the command to run an app in the emulator (or mobile connected), this error message appears Error: Failed to…
-
0
votes3
answers175
viewsA: INSERT with prepare does not work
$sql = "INSERT INTO cotacao SET chave = ?, id_transfer = ?, id_empresa = ?, nome = ?"; $query = $mysqli->query($sql); Try this, don’t forget to pass the array parameters, or use normal even.…
-
0
votes1
answer113
viewsA: View database data from
$sql = $pdo->prepare("SELECT * FROM animestb"); $sql->execute(); while($ln = $sql->fetchObject()){ echo "<img src='".$ln->img."'>" } Please do not use mysql_query has been…