Questions tagged as 'if'

1
answer

How do I make a .clic event depend on an onclick?

I would like to know how I can break a control statement IF . The problem is that I have two actions that are executed when I click on one of my buttons an action I call it with the onclick and the other with the function .clic...
asked by 08.07.2017 / 09:27
1
answer

Check if several values are in a python list

I have a list of integers called MsgID and I want to do an If where it checks if within that list there is any value greater than 3. My attempt: if [3,2,1,0] not in MsgID: pass I've also tried with if MsgID > 3: pass  ...
asked by 05.05.2017 / 10:15
1
answer

Several conditions within the same if php

I need to create an if with several conditions there are many examples in the forum but I do not give any to serve me. I need the if check two conditions the first one checking if the $user_id equals the auth()->user()->id) i...
asked by 05.11.2018 / 03:30
1
answer

how do I get these if statement to work?

What happens is that when I run my program, the output repeats the questions more than usual (sometimes 4 times sometimes 2 or 1). My mistake may be because I call the functions many times or because I misuse the if statement but I'm not sure...
asked by 13.10.2018 / 01:29
1
answer

asp.net mvc doubt with the conditional if with keys and without keys "{...}"

I have a question about what moments or parts of the code you can use a conditional if or another that can be written without the keys { ... } . For what I read this will depend on the amount of code that contains that conditiona...
asked by 09.05.2018 / 17:13
1
answer

Comparison in bat file cmd

I'm trying to make a comparison using the IF () where I compare the current month and assign its name but I can not print the results of the variables This is the code I have @echo off SET FOLDER=%Date:~0,2%-%Date:~3,2%-%Date:~6,4%-%time:~0...
asked by 30.10.2018 / 15:37
1
answer

I can not solve a problem with an if

I'm doing a game in which you have to calculate the time in seconds that is requested by keyboard, and when that time exceeds the end of the game. But when it goes through that if , it does not calculate time or it's infinite or it just le...
asked by 24.01.2018 / 20:40
1
answer

The if only recognizes me the last element of the array, what do I do?

function comenzar(){ var caja=document.getElementById("caja"); var numero=document.getElementById("numero"); numero.addEventListener("change",background,false); setInterval(background(),50); } function background(){ valores...
asked by 10.04.2017 / 17:49
2
answers

problem with style change using php and change of values in echo

I'm trying to create a style to show it if the field is 1 or 0 When it's 1 and 0 it shows me well, the thing is that if I'm wrong and I want it     appear the red style the green still appears. <?php if($resultado['id_usuario_autoriza'])...
asked by 29.10.2018 / 15:30
0
answers

Structure an HTML calendar created with For cycle that repeats dates obtained from MySQL

The following code corresponds to a For cycle that fills a calendar made with HTML (see the following image). In this case, the events obtained by dates from the DB are shown. Those dates are doubled and try to fix it with an if but it ju...
asked by 07.10.2018 / 06:05