In my SQLite table, i have fields. Some of these are called j_weight1, j_weight2, j_weight3, j_weight4 and j_weight5
I never need more than one of these "j_weightX"...
That's because you can't call a function (by the jb1 on the last line) that is on the "transaction". You have to encapsulate it in another function and call this one. Like that :
I have an array created in a function. But i can't use the array out of the function. In the code here, the two "alert boxes" give an undefined error for the array "fighters".
Well, what i need is for the script to wait for each transaction to be done before continue. And javascript don't wait for sql request to send a callback.
I have a lot of elements on the page (isometric map), nearly each with it's own z-index.
It's okay, they all respect their z-index priority (high z-index...
After hard brainstorming, i finally discovered how to do... to be kicked in the balls by the fact that when a javascript run too long (and too long mean very short), the browser complain and ask for...
for (var i = 1; i < fulldays + 1; i++){
if (i==1) {var a = "";} else {var a = "-";}
var newtext = document.createTextNode(a+i);
document.getElementById("ID_of_your_element").appendChild(newtext);...
I understand, but what i want is a way to make the same script intercept the "onclick" (onlick ? You wish !). With your example, a click call another script.
Then, my kingdom game with rats in JS is on the road. I even started to make it have "turns". Work well (thanks again for the innerHTML solution, guys).
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html;...
As a noob, I'm trying to make a little game in JS (only client side). For that, i put images in different positions on the screen without problem with style.position/bottom/left/zindex.