Posts by Jorge.M • 2,818 points
134 posts
-
0
votes2
answers319
viewsA: How do CSS ignore if the attribute is capitalized or lowercase?
Only with CSS I don’t know if it’s possible to do it, but I created a solution using jquery. I don’t know if it’s what you’re looking for, it’s just an idea of how it could be done. I left the code…
-
0
votes1
answer84
viewsA: Change login user status
See that you’re giving one update without specifying a id, thus generating a change in all users. Another thing, if you’re making one preparação query, why not use a placeholder in the same? In the…
-
0
votes1
answer78
viewsA: Hide and open div under certain conditions
You can use the event mouseenter within the div to check while the mouse is in the div and thus add a class for control, for example divativa, at the event mouseleave i.e., when the mouse is no…
-
2
votes2
answers339
viewsA: How to validate integrity when trying to save duplicate data to the database?
This message means that you are doing another insertion with the same combination of columns that are part of the table un_checklist_estrutura, which must be defined as UNIQUE. If so, it does not…
-
0
votes2
answers168
viewsA: How to make a single meta Description and meta Keywords in a PHP document that only has 1 header for all pages
Attention: The example will only serve for the case cited by the author . You can take the current page that is being used through the parameter p using $_GET['p'] and make the check according to…
-
2
votes2
answers278
viewsQ: How to fix menu with fadein effect?
I have the following code that fixes the menu using bootstrap: $(window).scroll(function(){ scroll = $(window).scrollTop(); if(scroll > 500) { $('.navbar').addClass('sticky-top') } else {…
-
1
votes2
answers56
viewsA: Random site background videos
My friend, just follow the same reasoning applied in the images, what changes is that you will change in src of the video. Using Jquery would look like this: $('document').ready( function(){ var…
-
0
votes1
answer80
viewsQ: How to make relationship between 5 tables?
I have the following tables: conteúdo, aulas, curso, turma, grupo_User where logic will be the following: Content can belong to several classes, as a class can have several contents A class can…
-
3
votes0
answers338
viewsQ: What are the two double points (::) for?
I see in some classes something like this: Illustrative class class Carro { private static $quantidade = 5; public function getQuantidade() { return self::$quantidade; } public function comprar() {…
-
1
votes2
answers67
viewsQ: How to show the feedback message only for the focused field?
I’m performing a scan using jquery with the intention of applying this method in a more elaborate future project. There is no problem with the script, what I need is: When you start typing in the…
-
0
votes1
answer35
viewsA: Change from javascript to jquery to codeline 2
You don’t need to select the element this way, instead of selecting it that way, use the selector id = # and pass the element name, like this: var newSubjectText = $('#hiddenFieldName').val(); An…
-
2
votes3
answers2062
viewsA: html form with PHP code to insert into mysql
The problem is that in your query you are not stating where the data will be entered. How are you: $sql = "INSERT INTO 'banco_teste' VALUES "; $sql .= "('$nome', '$sobrenome', '$sexo')"; Properly:…
-
0
votes0
answers20
viewsQ: Semantics - Hide or remove feedback messages?
I know that this question can be closed because it is based on opinions but, in order to maintain good practices, follow the scenario below: 1- User made a registration on the site. 2- I display a…
-
1
votes3
answers97
viewsA: Paragraph count
If I understand correctly, taking into account that your paragraphs are inside some container with an identifier, da para fazer com Jquery as follows: var div = $('<div> Essa é a DIV de…
-
3
votes1
answer68
viewsQ: How to consume validation function?
For didactic reasons, I created a php to validate 3 fields, the function is in the file validate.php : <?php /** * Created by PhpStorm. * User: Jorge * Date: 01/06/2018 * Time: 10:40 */ function…
-
0
votes3
answers426
viewsA: How to Take "resize" from a textarea?
Speak Dan, just add resize: none; for the tag. If you want, you can still manipulate its height and width via css. Example: textarea#example { resize: none; width: 50%; height: 100px; } <textarea…
-
0
votes2
answers533
viewsA: How to create a script to automate link exchange in HTML?
Thanks to everyone who helped me, I managed to solve with the script below that reply of international stackoverflow. <!DOCTYPE html> <html> <head> <meta charset="utf-8">…
-
0
votes2
answers533
viewsQ: How to create a script to automate link exchange in HTML?
I am performing maintenance on a system that has on a page hundreds of links as follows: <li> Revista alvo <a href="http://exemplo.com"> http://exemplo.com </a> </li> Note…
-
2
votes1
answer207
viewsQ: Check current date automatically
I’m developing a system in PHP where: I make available an entry contest page for the staff, but this page has an end time, example: The page will be available from today 08/05/18 :17:11 and will…
-
2
votes1
answer84
viewsQ: Table populated via bank coming with empty field
I’m populating a table via a select I have in my file selectUser.php. selectUser.php: <?php require "conexaoBD.php"; $nome = $_GET["nome"]; try { $pdo = new PDO($server, $dbuser, $dbpass); $sql =…
-
2
votes1
answer647
viewsQ: How to show and hide element according to scroll?
I want to hide the image when the scroll page is larger than 147, so far so good, the problem is that I can not hide the image again when the scroll is less than 146. The goal is to hide and show…
-
2
votes1
answer231
viewsQ: Take the previous element’s margin and add one more value to the next
I have the following code: <script> $(document).ready(function() { $("div#bloco div").css({ "background-color" : "red", "height" : "50px", "width" : "50px" }); $("div#bloco…
-
0
votes1
answer636
viewsQ: Problem with accentuation when exporting data from Sql Server to Excel
I have the following code inside a button responsible for performing the export of data from my table to excel. string caminho = "c:\\caminho"; // criar um arquivo para escrever using (StreamWriter…
-
0
votes1
answer105
viewsA: Enable button according to page
If there is no page reload, you can accomplish it in the following way by just adapting the example to your need. Use bootstrap to achieve the desired accordion effect. Wrap your divs of content in…
-
3
votes1
answer603
viewsQ: Is it possible to change CSS from an iframe?
I got the following iframe embedded Google Calendar: <iframe…
-
14
votes4
answers1171
viewsQ: What is the difference between -= and =-?
In java and other languages I’ve seen in some projects things like: saldo -= 100 and sometimes saldo =- 100 but I could never understand the difference between those two guys, if there’s any…
-
-1
votes3
answers1141
viewsA: How to call HTML code inside css?
From what I understand, you want to select an element of your HTML and assign an image dynamically according to the class of its element CSS. I made an example using Jquery where I assign the image…
-
0
votes1
answer81
viewsQ: Carousel element change capture
I got the following carousel done in bootstrap Previous Next And I got the following js done in order to catch the title from whatever image you are ativa on screen at the moment: setInterval(…
-
1
votes1
answer243
viewsQ: Scroll according to clicked element
I have a list of links, example: <ul class="todos-links"> <li> <a href="#alvo1"> Alvo1 </a> <li> <li> <a href="#alvo2"> Alvo2 </a> </li>…
-
0
votes0
answers27
viewsQ: Help with jslider Plugin
Has anyone ever used that plugin? I’m trying to implement it on a page but I’m not getting it and the documentation has nothing. I managed to implement the html and some issues in css as shown…
-
0
votes3
answers262
viewsQ: Browse array to find a particular index
I have the following code JS: var botao = document.querySelector('input[type="submit"]'); botao.addEventListener('click', function(e) { let form = document.querySelector('form'); let ipt = { nome:…
-
0
votes2
answers998
viewsQ: URL redirection via web.config
I need to perform a page redirect http://exemplo/comunicacao/ to the page http://exemplo/caminho_novo/comunicacao. I’m performing the following on web.config : <?xml version="1.0"…
-
0
votes2
answers411
viewsA: Problem with push and pull on github
You need to update the git for the latest version https://git-scm.com/downloads
-
0
votes0
answers234
viewsQ: How to change the content of an inherited class variable?
I am developing a transaction system for methodological purposes. I have the following classe mãe calling for Conta: public class Conta { private double _saldo = 0; private String _nome; private int…
-
1
votes2
answers459
viewsA: How does Hoisting work on ES6?
To begin, it is worth mentioning some concepts: The declaration of variables of the type var can be a big problem for the simple fact that it can be changed regardless of where it is, see in the…
-
0
votes3
answers110
viewsA: How to access img of a JQUERY figure?
To select the atributo src, do as follows: link = $('figure img').attr('src'); You can’t access it the way you’re doing it link = $(this img).attr('src'); for img is not enclosed in quotes, so the…
-
2
votes2
answers1404
viewsA: Check if checkbox is selected in input
You can use the onchange and make a if that if the field is "checked", it will trigger the function. I added the same function, only on onload page, to call the function when the document is loaded.…
-
3
votes3
answers838
viewsA: take input value Hidden within a <td> tag
Simple, just capture the element that was clicked and catch your value using the method val(): $('table tbody tr td input').dblclick(function(){ var id = $(this).val(); //captura o id cdo input…
-
2
votes3
answers324
viewsA: Add <option> automatically each month
As I mentioned in the comment above, here is a solution on the side of client. I left comments in the code, in case you have any questions you can ask. $(document).ready(function(){ var date = new…
-
2
votes3
answers485
viewsA: Select a div without it having a class or an id?
You can do it that way: $(document).ready(function(){ $('#teste div:nth-child(2)').css('background-color','red'); }) <script…
-
1
votes2
answers681
viewsA: Exchange contents of a div for an html file
The answer that Hugo quoted above is the most semantic way to do this. Just for information, a brief explanation: For example, in C# we use the <!--#include file=".caminho_do_arquivo" --> to…
-
10
votes2
answers3110
viewsQ: Mysql = Mariadb, huh?
It’s been a few days since I’ve been listening to the teacher in my class saying,: Oracle purchased the MySQL and just renamed it to MariaDB. As I am not easy to believe in the things spoken, I went…
-
2
votes2
answers198
viewsA: Jquery removes all the least selected Divs and the ones from the other menu
If you want to remove, use $('div').not($(this)).remove(); as in the example below, if you just want to hide, use the $('div').not($(this)).hide(); You remove all elements and deny the selected…
-
0
votes2
answers34
viewsA: force an event from a button after deleting registration via modal
Use the trigger passing the click as a parameter. $('#btnDelteYes').click(function () { var id = $('#myModalDelete').data('id');…
-
0
votes1
answer3794
viewsQ: How do I get Nodejs running as a service?
I was doing some research around here and found only solutions for linux, let the server run by dos it’s not safe, because at any time there could be a fall. The question is, is there any method to…
-
0
votes1
answer3794
viewsA: How do I get Nodejs running as a service?
The solution to this is called : Windows Service By default, your Node.js site will run while the console window that started your site is running. If you close it, or your server restarts, it’s…
-
0
votes1
answer120
viewsA: Instantiating an object of one class within the constructor of another class
From what I’ve noticed, you’re using typescript, to inherit the classe, just use the extends as follows: Rover extends Mars
-
0
votes2
answers41
viewsA: How to check form values before sending it Javascript / jQuery
Just state the variáveis within the event of click, thus the values of inputs will be captured whenever there is the action and using the function Math.max(), we found the largest number between the…
-
0
votes3
answers213
viewsA: Coloring line background(Row) on Django admin
Notice that you are selecting $('#result_list tr td:nth-child(4)') this way, it will select only the td. do as follows $('#result_list tr') to be able to apply the css on the lines instead of only…
-
3
votes4
answers9949
viewsA: Load image via javascript
Another solution using Jquery <img class="razer" id="imageoption"> Script: $(document).ready(function(){ $('#imageoption').attr('src','images/hyperx-option.png'); }); Once the document is…