when I click a button, this sum "max clicks + 1" when it reaches 5, this fails and stops.
Forum
![>](img/i_next.png)
![>](img/icons/offtopic.png)
![>](img/i_next.png)
JavaScript HLP
14 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
when I click a button, this sum "max clicks + 1" when it reaches 5, this fails and stops.
1
maxclicks = maxclick + 1;
1
maxclicks = maxclicks + 1;
![user](img/i_friend.png)
works, but that no stop when reach the limit
1
if (maxclicks < 5) {
1
maxclicks = maxclick + 1;
![user](img/i_friend.png)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
function gen(){ var maxclicks = ""; var msclicks = 0; if (maxclicks < 5) { var obt = document.getElementById("hue") var pri = repeater(); var seg = repeater(); var ter = repeater(); var ptm = pri + "-" + seg + "-" + ter; obt.innerHTML = ptm; maxclicks = msclicks + 1; } }
send me a mp
how i can show points of users ?
1
<li><a href="./points.php">Points $points["user_id"]</a></li>
![IMG:https://i.imgur.com/VIkKiOy.png](https://i.imgur.com/VIkKiOy.png)
1
<?= $points["user_id"] ?>
1
<?php echo $points["user_id"]; ?>
Also:
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
var maxclicks = 0; var obt = document.getElementById("hue"); function gen() { 	if (maxclicks < 5) { 		var ptm = repeater() + "-" + repeater() + "-" + repeater(); 		obt.innerHTML = ptm; 		maxclicks++; 	} else { 		alert("nope."); 	} }
hueit's best to call
document.getElementById()once instead of each time. It only saves like half a millisecond but still
![](img/smiles/wink.gif)
And to be honest you would be better disabling the click of the element instead of it still calling the function each time.
edited 2×, last 21.07.16 09:27:01 am
1
<li><a href="./stats.php">Points <?php echo (!isset($points));?></a></li>
on my database . Points = 5
but on my web only show 1 for all users...
![IMG:https://i.imgur.com/q4U6Fj8.png](https://i.imgur.com/q4U6Fj8.png)
![IMG:https://i.imgur.com/tQfQtc0.png](https://i.imgur.com/tQfQtc0.png)
Why are you using isset? Change your database structure and give
pointsa default value of 0 then you should never have to unless you use the same code for another database table, which is highly unlikely.
Show us your code which requests the point count.
edited 1×, last 21.07.16 11:18:32 pm
who i can change ??
![IMG:https://i.imgur.com/lqVipP7.png](https://i.imgur.com/lqVipP7.png)
INT
VARCHAR
TEXT
DATE
password type selected : VARCHAR
![•](img/dot.gif)
edited 1×, last 22.07.16 09:55:22 am
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)