Using objects with properties and methods can certainly be useful over just using functions and variables even if you only need one object. Not least, it can give your program a better structure....
stop() just stops the animation - it does not finish nor reset the style of the animated elements, which might have given you weird results. Also note that stop() doesn't affect...
If you know how to use both then you should also know that the second script not just calls a function, but it also creates and returns a new object. The following two scripts does the same thing...
var colors = ['red', 'yellow', 'blue'];
for (var i = 0; i < colors.length; i++) {
if (theF[colors[i]].checked)
cost += parseFloat(theF[colors[i]].value);
}
Then that's your problem: both CreativePouhons.html and Inventairesdesoeuvres.html contains <head> and <body> elements, and both files imports the sorttable.js script which affects the final page,...
Improper use of eval could open up the possibility of injection attacks, mainly if you use user input in the eval code and just assume the input is safe. (To build a secure application you should...
One solution is to use setTimeout to start the screen saver after a while, let's say 5 minutes, and if the user touches the screen before the timeout has ended you cancel and restart the timeout. You...
array.indexOf returns the index of the object you specify as argument. When you say {id: fid} you're actually creating a new unique object at that very point. The result in this case is that indexOf...
No, in /Creative.html the script (sorttable.js) is included twice, not in the head tag at the top of the html document, but in two other separate head tags - a quick search will prove that. Your head...
Ok, good. :) I'll just say that Firebug is a great tool for debugging purposes - it's just not especially good when you're learning and experimenting with the JavaScript language.
There are errors in the code - the javascript: part should not be there, and you don't have to return anything in the onload attribute. Anyway, you can include several statements in the onload...
Well I meant writing the code in a HTML document and then showing the document in the browser - I should have explained that clearer. Pasting everything in the Firebug console gives me an error too....
You're missing a var keyword before the i in the for loop. Without it i will become a global variable. Also, using the array literal notation ([]) is shorter/faster/cleaner than writing new Array(),...
You could either remove the event listener when clicking the button and add it again when the request is done, or just set a boolean that keeps track if a request is in progress or not - something...