Posts by Phelipe • 1,541 points
81 posts
-
2
votes3
answers1606
viewsA: mascara and formulary validation
If you do not want a plugin to make validations or put masks, you can use the following code: var mask = '###.###.###-##'; $(document).ready(function() { $("#cpf").keypress(function() { var tamanho…
-
1
votes1
answer2797
viewsA: Bootstrap Validator
To do what you asked I made several modifications, both in HTML and script. Below is the updated code. $(document).ready(function() { $('#se-form').bootstrapValidator({ message: 'No es valido',…
-
1
votes2
answers173
viewsA: Leaving CSS inside HTML pages disrupts SEO ?
It is not certain which algorithm Google uses to rank the sites, and this algorithm is constantly changed. Therefore, there is no way to state for sure whether or not this will affect the ranking of…
-
6
votes1
answer3994
viewsA: How to upload an image using jquery/ajax?
To send images via AJAX you need to use the object FormData and configure the ajax request this way. Note that it is not necessary to take the value separately from each <input> as you are…
-
1
votes1
answer111
views -
0
votes1
answer94
viewsA: How to display DIV only if the function result is true?
Just create a div below the element where you want the message to appear and add the texts to it when the CPF validation error occurs. I also added the code that removes this text when a valid CPF…
javascriptanswered Phelipe 1,541 -
0
votes2
answers1681
viewsA: Help with COMBOBOX, Select cities according to chosen state
The most advisable is to make an ajax request to a page that returns a JSON with the id values and the name of each city related to the ID we send. If you use Jquery the code will be something like:…
-
3
votes1
answer280
viewsA: How do I use the setTimeout() method to delay the appearance of an Alert in Javascript?
You can do it this way: define a function in which you will do the alert(). function minhaFuncao() { alert('Chegou aqui.'); } Now, you can call the function setTimeout passing as first parameter a…
-
0
votes1
answer35
viewsA: Change default value of a function parameter
Codeigniter deprecated the use of the massive xss filter automatically. To do this you must filter each input separately, this way: $this->input->post('meuInput',TRUE)…
-
2
votes2
answers90
viewsA: PHP print names in upper case
You need to use the function strtoupper() at each value. Below is the code to do this. <?php $nome_alunos = array('andre' => 1 , 'paulo' =>5, 'fabio' => 2); asort($nome_alunos); foreach…
-
0
votes2
answers1354
viewsQ: Change div size by hovering the mouse
I have a page with some Divs and would like to apply an effect when the mouse goes through some of them. What I would like to happen is that, when passing the mouse through one of the Ivs it…
-
0
votes2
answers1977
viewsA: HTML - Why use, or not use, " /> " to close tags without content?
Closing tags comes from HTML5, so if you’re developing a site using HTML5, it’s important to close tags. It is important to develop already with the HTML5 standard because browsers may stop…
-
0
votes1
answer45
viewsA: How do I make my registration form safe for my database?
As already pointed out in the comments, the correct thing would be to study about security and how to implement it in PHP and, if any more specific questions arise, ask here. What we can do is give…
-
1
votes2
answers1095
viewsA: Take the value of an input and return alert
The previous answer is correct, but apparently there is an error in the calculation of the BMI, take a look at this. As I had already begun to answer the question I will publish a code I had made…
-
2
votes1
answer316
viewsA: Route structure of Codeigniter
Codeigniter provides a configuration file to handle only routes. This file is in the application/config/Routes.php. If you want to know all the possibilities available I advise you to read the…
-
2
votes2
answers370
viewsA: Error "Show More" html button
You were using the same id for both inputs. I solved it this way: .hide { display:none; } input[type="checkbox"] { display: none; } #btn-a:checked ~ .hide { display: block } #btn-a:not(:checked) ~…
-
0
votes1
answer36
viewsA: How to make my while repeat the div but change the images from the Bootstrap slider
Simply add the following code within the div with class Carousel-Inner. <?php $primeiro = true; $consulta = "SELECT * FROM slider"; $cons = mysqli_query($conect_phpmyadmin, $consulta); while…
-
0
votes1
answer238
viewsA: Problem passing value to PHP variable with Ajax
The variable code was not set. Now she is taking the value of her input, which at the moment is Confirm Subscription. In your PHP code you will have something like: echo $_POST['cod']; This will…
-
6
votes3
answers1047
viewsA: Apply effect when changing value of an input
If you want to work with jquery the code is this: $(document).on('input', '#slider', function() { var num = $(this).val(); console.log(num); $(".p1").css({ 'font-size': num*3+'px' }); }); <script…
-
0
votes1
answer138
viewsA: How to redirect a user to a specific page only at the first login of the wordpress site?
You can use a flag to know whether or not this is the first time a user has logged in to your platform. Add this flag to your database and whenever the user logs in you test the Fleg. After testing…
-
1
votes2
answers2217
viewsA: Radio de Preenchimento Obrigatório html
Just add the required attribute to the input tag. It would look something like: <input type="radio" name="Estado" value="Concluído" required>Concluído
-
0
votes1
answer135
viewsA: How to interact with database data with Javascript
The best way is to send an ajax request to your API, your API does the query in the database and returns a reply JSON. From the moment you are in possession of your JSON, just do what you want with…
-
0
votes1
answer912
viewsA: Address of pages with codeigniter
To remove the need to always put index.php in the urls you need to create a . htaccess file at the root of your project with the following code: <IfModule mod_rewrite.c> RewriteEngine On…
-
2
votes2
answers968
viewsA: PHP How to generate a unique ID equal to the GOOGLE shortener
I confess I don’t know how to do that automatically. But one solution I thought was you make an associative table between an ID and the generated characters. You would do a function that would…
-
2
votes1
answer122
viewsQ: Progress bar in a cell of a table
I am making a calendar and need to make a progress bar of the time elapsed each day. I have assembled the calendar using HTML tables. How can I make this progress bar each day separately?…
-
0
votes2
answers1006
viewsA: AJAX request returning the entire HTML page
As you made an ajax request, anything you mount in your back-end (for example an echo in php) will go back to your ajax response variable. What you have to do is redirect the user if he has…
-
2
votes1
answer5846
viewsA: How to remove inner shadow from button or input
The css property that puts shadows on objects is box shadow. To remove the shadow just put box-shadow: none;…
-
0
votes1
answer49
viewsA: Insertion, editing, removal and visualization of data
You can use Jquary to help with your asynchronous requests. With a simple code like this below you can make an asynchronous request. $.ajax({ url: "demo_test.txt", method: "GET", data: { name:…
-
2
votes1
answer64
viewsA: How to get the result of two sqlite tables
What you need is an INNER JOIN. SELECT Currencies.code, Currencies.name, Currencies.symbol FROM moedapais INNER JOIN Currencies ON (Currencies.code = moedapais.code) INNER JOIN Pais ON…
-
0
votes1
answer215
viewsA: How to Block Navbar Functions for Logged-in Users Only?
You can add a check inside your html code. For each link you want to block for logged in users you add the following code: <?php session_start(); if (isset($_SESSION['id'])) { echo '<li…
-
1
votes1
answer1034
viewsQ: Dropdown does not fit the screen
Hello, I’m starting my migration to Bootstrap 4 and I’m trying to make a dropdown aligned on the startling right of the layout. The problem is that by clicking on the menu it does not adjust the…