Posts by JassRiver • 654 points
30 posts
-
1
votes1
answer26
viewsA: Pick element by css selector
Try this: // Exemplo let queryScape = document.querySelector(`.f\\:\\.9.m-b\\:\\.4.m-t\\:\\.5.d\\:i-b`); queryScape.style.background = 'red'; // Código…
-
2
votes1
answer35
viewsA: Return two functions in a JS onclick event
You can try it: var stateButton = false; function ativar() { var btn = document.getElementsByTagName("button"); if ( stateButton == false ) { btn[0].innerHTML="ativado"; stateButton = true; } else {…
-
2
votes2
answers34
viewsA: problems retrieving "Answer" from a request
Try this: let rqs = new XMLHttpRequest(); rqs.onreadystatechange = function() { if (rqs.readyState == XMLHttpRequest.DONE) { console.log(rqs.responseText); } } rqs.open("GET",…
-
2
votes1
answer126
viewsA: Sum line in matrix
Try this: <?php $matriz = array( array(1, 10, 3, 50), array(1, 10, 3, 50), array(1, 10, 3, 50), array(1, 10, 3, 50), array(1, 10, 3, 50) ); $num_lines = count($matriz); $num_elem_per_line =…
-
1
votes1
answer69
viewsA: send form to another html page
Explanation: When you send the form from page 1 to page 2 it creates "Parameters" at page 2 url For example: http://127.0.0.1/pagina2.html?nome=Fulano&nascimento=01/01/1990 The function you are…
-
1
votes1
answer33
viewsA: Problem when displaying content and changing the view
Incorrect solution: If I understand, you’re making one "foreach" on "qrs" and for each qr you are using the code you have pasted into the script. So try the following solution (I haven’t tested, I’m…
-
1
votes1
answer185
viewsA: Refresh table without refreshing page
"Resolution" You are trying to load the whole page into the #table-refresh The url requests/list.php is the current page you are accessing, so load it will just print it again. You’re technically…
-
-2
votes1
answer223
viewsA: Script that counts amount of Notes and Coins in box in Python does not work
Try the code below: print('=== FECHAMENTO DE CAIXA ===') # Valores m1 = 0.05 m2 = 0.1 m3 = 0.25 m4 = 0.5 m5 = 1 c1 = 2 c2 = 5 c3 = 10 c4 = 20 c5 = 50 c6 = 100 # Input de Quantidade de Cedulas (Caso…
-
3
votes1
answer35
viewsA: wordpress template is outside the <Section>, how to display inside?
$teste_tp_slugs = ['company', 'search', 'customers']; ob_start(); foreach ($teste_tp_slugs as $teste_tp_slug) { echo '<section id="teste-site-home-' . $teste_tp_slug . '">'; echo '<div…
-
1
votes2
answers52
viewsA: How I write in Python documents on For
There are some things wrong with your script, but I think what you want to do is this: arquivo = open('escala.txt', 'w') for i in range(0, 101): var = (i * 2000)/100 escreva = 'Temperature is:…
-
-1
votes1
answer29
viewsA: How do I take multiple typed data and save to a php array
Follows the code: <form action="" method="POST"> <input type="text" name="texto[]"> <input type="text" name="texto[]"> <input type="text" name="texto[]"> <input…
-
1
votes2
answers100
viewsA: CSS -> DIV content on ::after content
Follow the corrected code below, hope it helps :) body div#duvidas > section.duvidas { flex-direction: column; width: 60%; } body div#duvidas > section.duvidas > article { border-width: 1px…
-
0
votes1
answer157
viewsA: Paging does not work with Offset Wordpress argument
Jr17, the error is found in the index.php file Right here oh: query_posts("posts_per_page=10&offset=3paged=$paged"); The error there is that you are using & to join the offset in…
-
0
votes1
answer577
viewsA: List Categories and Subcategories on the Site - Wordpress
See if the code below can help you: <ul> <?php $terms = get_terms(array( 'taxonomy' =>'categoria', 'hide_empty' => false )); foreach($terms as $term){ ?> <li> <div…
-
0
votes1
answer59
viewsA: After changing the Wordpress login URL manually, I was unable to logout
You can do it like this: In the archive functions.php of your theme, add this code snippet: // Substitui o link de logout pelo retornado na função heathso_logout_link add_filter( 'logout_url',…
-
2
votes2
answers132
viewsA: Filter results from BD with JS (no refresh and no request to other pages)
Friend, see if the code below can help you :) <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script type="text/javascript"…
-
1
votes1
answer39
viewsQ: Help to send jQuery cloned inputs to the database
I have a form that will add links from download servers to a file, however each file may contain n links from download servers In HTML: <input type="text" name="server_down"> This input is…
-
2
votes1
answer63
views -
-2
votes1
answer241
viewsQ: Call the function in PHP several times or store the function in variable?
I was here creating some loop files when I came across the following question: Instead of calling a function that returns the die every time Ex: <?php if (pegar_dado('nome_dado') != '') { echo…
-
0
votes1
answer58
viewsA: How do I move a variable into a frame?
This question already exists in the OS in English, but to facilitate your understanding I will give a translated On the page where the iframe will appear: function myFunction(){…
-
1
votes2
answers141
viewsA: setTimeout - the image not fixed on the screen (P5.js)
I could try like this: function setup() { createCanvas(windowWidth, windowHeight); } var reload = false; function draw() { background(25); function ball() { stroke(255); noFill(); ellipse(200, 200,…
-
0
votes1
answer165
viewsA: How to filter posts by Letter in Wordpress only in $_GET mode
I could give you all the code as I did the last times here on the site, but it turns out that the code already exists in the stack in English and even in other web sites So I’ll send you the links…
-
1
votes1
answer437
viewsA: Htaccess - Redirect all requests to a single file every time
It’s a half-assed solution, you can find better by searching on google (And yes you have, you should search before posting question here on Stack guy :/ ) Use the following code in your htaccess…
-
5
votes2
answers673
viewsA: How to identify if the user is at the top of the page?
jQuery Function: $(window).scrollTop() $(document).scroll(function() { if($(window).scrollTop() === 0) { // Coloque aqui o que você deseja fazer se estiver no topo } });…
-
1
votes2
answers42
viewsA: Error 404 when configuring custom URL
Italo, you have to configure the permanent wordpress links again and then it will generate you a file .htaccess correct on the server with redirect to friendly Urls. Or you can delete the .htaccess…
-
0
votes1
answer638
viewsA: xampp does not load javascript
User! You could add this line of code to your website’s header.php (OR THE PAGE HEADER) I recommend putting this code before any other javascript in the header (Below site title/page for example)…
-
1
votes1
answer42
viewsA: How to perform specific count of custom posts in wordpress
You said "count", for example "10 posts" Answer: Add this snippet to the following line of code: It’s like this: if (have_posts()) { while (have_posts()) { the_post();…
-
1
votes1
answer21
viewsA: Take site forwarding on the line
Try to create a file .htaccess within your domain (There must be a folder inside your /var/www/html/subdominio) Create a .htaccess both in its main domain /var/www/html how much in the…
-
0
votes1
answer282
viewsA: My website has been cloned would like a help from where to start solving the problem
Well the 3 sites you quoted are giving error 403 Forbidden here. This can happen for some factors: someone has access to your database and is making a remote connection to capture your posts (Make…
-
1
votes1
answer2330
viewsA: Checking if user is logged in to Wordpress (show to visitor)
Iae Vitor! Next man, there is no way to do it by the method you are doing haha! For this is a function... how can I say... that will be called and returned For example, you access the page and the…