www.webdeveloper.com

Search:

Type: Posts; User: Kever

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,012

    I guess the variable puzzleHolder isn't available...

    I guess the variable puzzleHolder isn't available within the scope of the function checkElement. You're errorconsole should throw an error like 'undefined variable: puzzleHolder'.
  2. Replies
    8
    Views
    1,012

    You can calculate the row number and the value of...

    You can calculate the row number and the value of i_2.
    row number = Math.floor(i/9)
    i_2 = -9+i%9

    I'm wondering why you're loop is running to i<=grid.length, instead of i<grid.length though.

    ...
  3. Replies
    3
    Views
    98

    Yes, add the input boxes and call the function...

    Yes, add the input boxes and call the function calculate_quarter, for the four quarters you need.
    1st argument is an array with the names of the month input boxes for that quarter.
    2nd argument is...
  4. Replies
    3
    Views
    98

    If you're repeating alot of code with different...

    If you're repeating alot of code with different variable, you should try to make functions out of it.


    function SumAverage(){

    function calculate_quarter(months, categories, avgNode,...
  5. Replies
    21
    Views
    197

    It might seem confusing at first, but it helps to...

    It might seem confusing at first, but it helps to recognize those function in debuggers.
  6. Replies
    21
    Views
    197

    The outer (closure) function is self-executing...

    The outer (closure) function is self-executing and returning the inner the inner function. The global isPrime becomes the inner isPrime function.
    The scope of the outer function is preserved and can...
  7. Replies
    21
    Views
    197

    Yes, that's correct

    Yes, that's correct
  8. Replies
    21
    Views
    197

    That console is a little confusing. The...

    That console is a little confusing. The referenced object is an instance of the isPrime constructor. A contructor could be seen as a template to create objects.



    function Person(name){
    ...
  9. Replies
    21
    Views
    197

    Since function declarations are executed before...

    Since function declarations are executed before other statements, the conclusion from above example doesn't seem right to me.
    The javascript interpreter runs it like:


    function isPrime(){var...
  10. IF you need to support older browsers you can do...

    IF you need to support older browsers you can do


    function bind(func, object) {
    return function(){
    return func.apply(object, arguments);
    };
    };

    parag.addEventListener("click",...
  11. Replies
    4
    Views
    614

    When you use document.getElementById on a non...

    When you use document.getElementById on a non existing ID it returns 'null', not 'undefined'.


    if(document.getElementById('testdiv') != null) {
    // exists
    } else {
    // doesn't exist
    }
  12. You should use a 'while' loop instead of a 'do...

    You should use a 'while' loop instead of a 'do while' loop. The 'do while' will execute the code block once, before testing the condition.
  13. When a function is invoked by an event 'this'...

    When a function is invoked by an event 'this' refers to the invoking element, or to the 'window' object depending on the way the function is referred to by the event....
  14. Should look like this: function...

    Should look like this:

    function sumMatrix(matrix){
    var row,
    col,
    rowLength = matrix.length,
    colLength = matrix[0].length,
    rowTotals = new Array(rowLength);
    ...
  15. Replies
    19
    Views
    1,368

    The second loop should be: for(y=0;...

    The second loop should be:

    for(y=0; y<=personarr[x].length; y++)
  16. Replies
    4
    Views
    1,654

    Seems IE is testing the arguments for your...

    Seems IE is testing the arguments for your window.doScroll method, as if they were given to it's own document.documentElement.doScroll method.
    Giving you function a different name should fix your...
  17. Replies
    11
    Views
    2,340

    Code between scripttags pointing to an external...

    Code between scripttags pointing to an external file isn't executed.



    <script type="text/javascript" src="/media/js/comments/comments-controller.js"></script>

    <script type="text/javascript"...
  18. Replies
    6
    Views
    1,209

    Since colorArray.length gives 3, and the last...

    Since colorArray.length gives 3, and the last index of the array is 2 since it starts at 0, i <= colorArray.length should be i < colorArray.length instead.
    And there is a bracket to many in the if...
  19. Replies
    18
    Views
    3,851

    Prototype Here's another example. // first create a...

    Here's another example.



    // first create a Person constructor, which takes two arguments and sets them as properties of the created instance
    function Person(name, age){
    this.name = name;
    ...
  20. Replies
    2
    Views
    1,475

    All you need to do is call DragHandler.attach...

    All you need to do is call DragHandler.attach with the element as an argument, when the DOM is done loading.
    There's no need to attach events to the element yourself.


    <script>
    window.onload =...
  21. Replies
    2
    Views
    1,180

    It's because IE versions lower than 9 convert...

    It's because IE versions lower than 9 convert bgColor="red" to bgColor="#ff0000", so you should test for that aswell. Or add descriptive classes to your cells so you can tell them apart in your...
  22. Replies
    6
    Views
    580

    function multiply(a, b) { return a * b; }; ...

    function multiply(a, b) {
    return a * b;
    };

    function partial(func) {
    var slice = Array.prototype.slice;
    var fixedArgs = slice.call(arguments, 1);
    return function(){
    return...
  23. Replies
    13
    Views
    1,993

    That old code will only run in quirksmode. Try...

    That old code will only run in quirksmode.

    Try this modernized version:

    (function(){


    // Settings...
  24. Replies
    6
    Views
    1,875

    You're browsers are fine, if you scroll down a...

    You're browsers are fine, if you scroll down a bit IE doesn't zoom in on the thumbnails anymore. You should try getting document.documentElement.scrollTop instead.
  25. Replies
    4
    Views
    3,603

    It's a problem with the version of mootools...

    It's a problem with the version of mootools you're using. You could try with the latest version.
    Or change


    a="<"+a+">";}return document.id(this.createElement(a)).set(b);
    to
    }return...
Results 1 to 25 of 52
Page 1 of 3 1 2 3
HTML5 Development Center



Recent Articles