Posts by Gabriel Rodrigues • 15,969 points
440 posts
-
1
votes1
answer162
viewsA: Font-size Responsive
The font does not respond to resizing in the browsers, it responds to the zoom in/zoom out and browser settings, so you can leave your font responsive in the browsers you must set its size according…
-
2
votes2
answers4492
viewsA: Use PHP variables in the body of phpmailer’s HTML email
You can also simplify this process by using the str_replace(). Instead of opening and closing php tags in your html you can create a macro and replace. Example: $body = '<tr> <p> Olá,…
-
1
votes2
answers58
viewsA: Json return from php to jquery ui
Transform your string $resJson in an array like this $resJson = array(); Then you will just increment the array with the values like this: array_push($resJson, $res['email']); At the end you use the…
-
3
votes3
answers703
viewsA: Prevent Bootstrap Oil
I just added the search within the navbar-header and got a little misaligned the search of Brand, so I added @media to reconfigure the navbar on mobile. Example: @media(max-width:767px) { .navbar…
-
2
votes1
answer3372
viewsA: How to view Tables in pdf with MPDF library?
Your problem lies in using the direct border attribute in the table. Unfortunately mpdf cannot perform this simple conversion: <table border="2"> // Para <table style='border:2px solid…
-
4
votes4
answers2128
viewsA: How to create a custom context menu?
To detect the right mouse click I used the addEventListener e attachEvent this way the solution gets cross-browser. In this example I open a simple menu, just by removing the display:none; Example:…
-
2
votes1
answer4125
viewsA: How to add an image popup when accessing the site
I couldn’t visualize the Kabum popup, but from what I understood in your question you intend to do something like: var close = document.getElementById('close'); var popup =…
-
3
votes3
answers1548
viewsA: How to enable and disable textarea with javascript?
You can do it like this: Example: var btn_habilitar = document.getElementById('btn_habilitar'); var btn_desabilitar = document.getElementById('btn_desabilitar'); var obs =…
-
7
votes5
answers86551
viewsA: Upload a file with AJAX
A simple multi-file upload solution using Ajax: HTML: <input type="file" id="uploadArquivos" multiple> JAVASCRIPT - AJAX: var uploadArquivo = $("#uploadArquivos"); uploadArquivo.on('change',…
-
3
votes1
answer617
viewsQ: How do I list all directories using FTP?
I’ve tried with ftp_nlist() and with ftp_rawlist() but the return is always an empty array. The Access/Authentication question is ok, you will only try to read a list if it already connected with a…
-
1
votes2
answers140
viewsA: Jquery text editing component
You can use the Summernote. Characteristics: Support for 3.x. x bootstrap Take only 80kb all (js and css) Intelligent interaction with the user Support in the browsers: Safari Chrome Firefox Opera…
-
11
votes4
answers60985
viewsA: Difference between :disabled and :readonly in HTML?
Just to complement the replies of @mend3 and @Cigano Morrison Mendez. Both disabled and readonly are predefined attributes, that is to say, they do not need to receive value for it to work. Example:…
htmlanswered Gabriel Rodrigues 15,969 -
1
votes2
answers1143
viewsA: Take first and last line element
Try to use the :nth-child thus: ul li:nth-child(1) { color: red; } ul li:nth-child(4) { color: red; } ul li:nth-child(5) { color: red; } ul li:nth-child(9) { color: red; } ul li:nth-child(10) {…
-
2
votes2
answers4704
viewsA: Count elements within a parent div separately
In this case you will have to go through the parent selector to access the children and tell, the way you are doing is searched all the elements at once. Example: $.each($(".pai"), function(key,…
-
6
votes1
answer1134
viewsA: How to create two Divs next to each other using mPDF?
Come on, No need to write inline css in mpdf, at the end just add: $mpdf->WriteHTML($stylesheet, 1); // seu css $mpdf->WriteHTML($html, 2); // seu html I recommend testing first in html and…
-
1
votes1
answer611
viewsQ: How to load an Image into a Uitableview?
I performed a request that returned me some texts and urls with images, these images I need to load them along with the text in parallel in the table. I am using Alamofire + Alamofireimage to load…
-
1
votes1
answer36
viewsA: image moves when the scrool goes up or down
You can do this using position: Fixed and specify a value for the alignment being,top,left,right and bottom... Then Add a js (jQuery for the div to track the scroll). Detail, you must specify the…
-
4
votes1
answer1161
viewsQ: How to set UTF8 charset?
I have a database that was created using Firebird 1.0, at this time there was no UTF8 charset available, only from version 2.0 was having this possibility, so we left the None charset. Doubts: 1°…
-
3
votes5
answers6065
viewsA: Get input array value
Solution in javascript only: var input = document.querySelectorAll('input[name=valor]'); var tam = document.querySelectorAll('input[name=valor]').length; for (var i = 0; i < tam; i++) {…
-
0
votes2
answers842
viewsA: List items from a Dropbox with navbar responsive bootstrap
To do this is quite simple, just check what is the resolution of the mobile device and add the class open within the dropdown class thus remaining: <li class="dropdown open"> I believe it is…
-
2
votes1
answer755
viewsA: Limit number of characters per line jQuery
Try it like this: textarea { word-wrap: break-word; max-width: 200px; max-height: 100px; min-width: 200px; min-height: 100px; resize: none; } <textarea maxlength="255"></textarea>…
jqueryanswered Gabriel Rodrigues 15,969 -
3
votes4
answers16259
viewsA: How to use Progressbar with Ajax and PHP?
Analyzing the presented follow-up model of a detailed request in the @Marco Aurélio Deleu. I found that there were some drawbacks that he himself mentioned. In some import tests, more than 300…
-
2
votes4
answers728
viewsA: Dynamically assign function
First select the elements whose class is close then trigger the click event on it, when the user clicks will remove the parentNode "above", remember, the elements relation function as a tree. var…
-
6
votes4
answers2497
viewsA: Merge two Javascript arrays
Da para você criar uma função simples para resolver isso, I made an example here, I have not tested several cases but for your problem presented solves. Example: var array1 = ['abc', 'def', 'ghi'];…
javascriptanswered Gabriel Rodrigues 15,969 -
4
votes3
answers3201
viewsA: Get class name of an object
If it was right what I understood, taking the class value would be something like this: var image = document.getElementsByTagName('image'); console.log(image[0].className);…
-
1
votes3
answers2476
viewsA: How to list json by separating key and value correctly
You are not taking the array’s Input by its key, but by the for iterator, which counts the size of the array, so if you have an Input that does not follow the sequence it will not return ordered.…
-
2
votes1
answer842
viewsA: How to Upload Multiple Files with Ajax?
I was able to send multiple files through ajax! What I did? Instead of sending multiple files through an array called files created for each file a file0 variable, file1 etc... Then I read the array…
-
5
votes1
answer842
viewsQ: How to Upload Multiple Files with Ajax?
I am trying to upload multiple files using ajax and came across the following problem, the beginning when I uploaded only one file it returned me in php the array $_FILES with the name of my file,…
-
3
votes1
answer473
viewsA: Carousel - thumbnail is not active when changing slide
Just add in your method on() a selector to remove the active and another to put the active in the reference item: Example: $(".thumbnail").removeClass('active'); $('#carousel-selector-' +…
-
5
votes1
answer212
viewsQ: How to reset Progressbar without using effect?
I’m performing various imports, and when I perform upload of a new file I need to reset the progress, this I can set the width with 0px, however it Zera with an effect in which I would not like to…
-
4
votes1
answer1321
viewsQ: How to embed exe in Project Delphi?
Setting: I have a system developed in Delphi 5 and another in Delphi EX8. In Delphi 5 I call the EX8 executable, so far so good, because it would only be an extra program for the user to download…
delphiasked Gabriel Rodrigues 15,969 -
0
votes4
answers9024
viewsA: How to make the 'focusout' event an input?
Kind of? var pesquisar = $("#pesquisar"); pesquisar.hide(); $("label[for='pesquisar']").click(function() { if (pesquisar.val().length <= 0) { pesquisar.toggle(); } }); <script…
-
1
votes2
answers6479
viewsA: How to insert CSS formatting in Java Script
You can also leave it preconfigured in your example style.css: var status = $(".status"); status.text('Enviando...'); .status { color: #f00; } <script…
-
1
votes2
answers127
viewsA: How to access dropdonw value without refresh
You can do that with jQuery: $("select").change(function() { alert($(this).val()); // ou text() }); <script…
-
2
votes3
answers5281
viewsA: take the value of a <td> by clicking on a checkbox of the same <tr> jquery line
Utilize parent() and find() to navigate to the parent element and then find the class .hora. Example: $(".iStatusVerde").click(function() { var valor = $(this).parent().parent().find('.hora');…
-
5
votes2
answers1964
viewsA: Consume Json Data - Webservice Swift 2 - iOS
You can use the library Alembic to carry out your requisitions, she and the most stable and built up Swift 2.0, others as Afnetworking are not so encouraged to still be made in Objetive-C. To add to…
-
5
votes1
answer776
viewsQ: How to keep the url fixed?
I’m using the mod_rewrite to rewrite the url, but I would like to leave it fixed, example: www.meusite.com.br/index.html www.meusite.com.br/produtos.html www.meusite.com.br/contato.html Ficar…
-
1
votes1
answer269
viewsQ: How to keep the user authenticated?
I’m using Alembic to send the authentication request like this: let user = "user" let password = "password" Alamofire.request(.GET, "https://httpbin.org/basic-auth/\(user)/\(password)")…
-
5
votes3
answers1304
viewsA: Download HTML link from the bank
Instead of putting the file path in an id put in href and use the download attribute, example: var arquivoParaDownload = "https://www.novatec.com.br/livros/javascriptguia/capitulo9788575222485.pdf";…
-
2
votes1
answer391
viewsA: Receive select fill in jQuery
Your problem lies in the selector as you are generating several <select> no for and they all have the id, which is unique, it can identify as only one,if you use class or even the tag to…
-
4
votes1
answer2541
viewsQ: How do I leave a gray-tinted image in cross-browser css?
I’m trying like this: img { filter: gray; /* IE6-9 */ filter: grayscale(1); /* Microsoft Edge and Firefox 35+ */ -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */ }…
cssasked Gabriel Rodrigues 15,969 -
11
votes2
answers1166
viewsA: Is it acceptable to use <H2>, <H3>, <p>, <div> tags within links/anchors (<a></a>)?
In the specification of the tag <a> in Permitted Elements HTML5 the following elements are supported and supported are semantically correct if they do not change the original behavior of…
-
2
votes2
answers991
viewsA: How to make the first 4 characters of a string smaller than the others
In php you can make a substr() to take the first 4 positions and then use the <font> to make it smaller . Example: $str = "Gabriel Rodrigues"; function examplo($str) { return "<font…
-
4
votes3
answers1293
viewsA: Problem to remove element added with jQuery
The problem is the scope, the delete click only this making effect outside the add click, and it is in the add that a new field is inserted. $(document).ready(function() { $('.add').click(function()…
jqueryanswered Gabriel Rodrigues 15,969 -
16
votes4
answers16259
viewsQ: How to use Progressbar with Ajax and PHP?
I found some examples where the developer implements a setInterval trying to predict the import time and in the complete ajax put 100% making that bar Progress get "a bit buggy" or jump from nowhere…
-
4
votes3
answers658
viewsA: Problem removing elements with jQuery
Your problem is exactly in the selector, which uses a unique identifier, use classes that will work. Example: var div = '<span><input type="text" name="op1"><a href="#"…
jqueryanswered Gabriel Rodrigues 15,969 -
0
votes2
answers3297
viewsA: How to set data in localStorage
First thing add a condition to check if the browser has support, then use setItem() to insert an item in localStorage, this function accepts two parameters, which are key and value. Example: var id…
-
7
votes1
answer6278
viewsQ: How to filter the file format by input type file?
When it is sent I do a validation checking if the chosen file is the format I need so: function validaExtensao(id) { var result = true; var extensoes = new Array('xls'); // Arquivos permitidos var…
-
4
votes4
answers11464
viewsA: Increase image when user click on JS
I believe that just for a view of the images a simple zoom in out effect would solve, if you need to permanencer the photo it would be advisable to create a modal and insert an image inside it.…
-
1
votes3
answers897
viewsA: Search - Show Message if results are not found
All you’ll need to do is identify how many tr are with display:none and when they are showing the message stating that there is no data for the given filter. Example: JS: var table = $("#table…