dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: ReFreezed

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,264

    Using objects with properties and methods can...

    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....
  2. Replies
    5
    Views
    1,264

    An small example using objects: function...

    An small example using objects:



    function Counter(){
    var count = 0;
    this.increase = function(){ count++; };
    this.showCount = function(){ alert(count); };
    }
  3. Replies
    1
    Views
    1,623

    Hi ctoz, stop() just stops the animation - it...

    Hi ctoz,

    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...
  4. Replies
    5
    Views
    1,264

    If you know how to use both then you should also...

    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...
  5. Replies
    2
    Views
    981

    var colors = ['red', 'yellow', 'blue']; for (var...

    var colors = ['red', 'yellow', 'blue'];
    for (var i = 0; i < colors.length; i++) {
    if (theF[colors[i]].checked)
    cost += parseFloat(theF[colors[i]].value);
    }
  6. So no image shows up when the page loads, but an...

    So no image shows up when the page loads, but an image does show up when you click? Then maybe you should echo a random number in the initial URL?

    src="/id/verifycode.php?<?php echo rand(); ?>"
    ...
  7. Remove the javascript: part in the onclick...

    Remove the javascript: part in the onclick attribute.
  8. Replies
    3
    Views
    1,305

    http://lmgtfy.com/?q=javascript+print+part+of+page

    http://lmgtfy.com/?q=javascript+print+part+of+page
  9. Replies
    3
    Views
    1,305

    You can only print the whole page and not a part...

    You can only print the whole page and not a part of it. You'd have to open a new window and put the content you want to print in it.
  10. Replies
    4
    Views
    1,214

    Use the getDate and getMonth methods to get the...

    Use the getDate and getMonth methods to get the date and month respectively:



    var monthNames = ["January", "February", "March",
    "April", "May", "June", "July", "August", "September",
    ...
  11. Poll: Then that's your problem: both...

    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,...
  12. Replies
    1
    Views
    1,502

    Improper use of eval could open up the...

    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...
  13. One solution is to use setTimeout to start the...

    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...
  14. You can use string.substr()...

    You can use string.substr() to extract parts of a string. Just cut up your date string and put it together in the order you want.
  15. Replies
    4
    Views
    2,181

    array.indexOf returns the index of the object 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...
  16. Poll: No, in /Creative.html the script (sorttable.js)...

    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...
  17. Ok, good. :) I'll just say that Firebug is a...

    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.
  18. Thread: onload event

    by ReFreezed
    Replies
    1
    Views
    842

    jQuery You can add something like this to your...

    You can add something like this to your JavaScript file:


    window.onload = function(){
    NewsScrollStart('0');
    }

    It's the same as <body onload="NewsScrollStart('0');"> .
  19. Replies
    1
    Views
    1,198

    There are errors in the code - the javascript:...

    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...
  20. Well I meant writing the code in a HTML document...

    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....
  21. Poll: No I missed the return statements, but I now...

    No I missed the return statements, but I now noticed that you're including the sorttable.js file several times in the HTML file.
  22. Replies
    6
    Views
    2,957

    You're missing a var keyword before the i in the...

    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(),...
  23. You could either remove the event listener when...

    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...
  24. Poll: I think I found a problem in sorttable.js... ...

    I think I found a problem in sorttable.js...



    if (this.className.search(/\bsorttable_sorted\b/) != -1) {
    ...
    this.className = this.className.replace('sorttable_sorted',...
  25. No the script should work. Did you enter the...

    No the script should work. Did you enter the whole script all at once or row by row in the console? (The latter would give an error.)
Results 1 to 25 of 229
Page 1 of 10 1 2 3 4
HTML5 Development Center



Recent Articles