User Profile

Collapse

Profile Sidebar

Collapse
jsakalos
jsakalos
Last Activity: Apr 16 '08, 03:33 PM
Joined: Jun 14 '07
Location: Slovakia
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jsakalos
    replied to random background colors
    You can find detailed information about Math object (beware, case matters) here.

    There is a lot of other useful information on the main site of that link.
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to Leap Year dertermination
    Come on gits,

    the last thing I want is to argue... And first thing I want is to help (and get helped when I need it).

    PS: 100 was an example; just because it's nice number. I'm too lazy to count Brigitte's lines. ;)...
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to Leap Year dertermination
    OK,

    let's let her decide. You see, I'm a kind of guy that looks for solutions. So I wouldn't insist on my 100 lines of code if I had a 3 lines replacement.

    Nevertheless, It's good to learn to make those 100 lines bugfree. :)
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to Leap Year dertermination
    Can anything be simpler than this?

    [php]
    var isLeap = function(year) {
    return new Date('Feb 29, ' + year).getMonth( ) === 1;
    };
    // usage
    alert(isLeap(20 00));
    alert(isLeap(20 01));
    [/php]
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to random background colors
    I would prepare an array with allowed background colors and I would use Math.random * sizeOfArray on each page load to get index to that array, took and set color from it.

    This way you can keep reasonable bg colors (pseudo) randomly selected.
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to Leap Year dertermination
    There is one trick you could use with Date object. First set date to "Feb 29, YYYY" and then get month from the same Date object. If you get Feb it's leap year, if you get March it's not.

    Beware, months are numbered from 0 - 11.
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to Temperature Converter
    Use Math object. It has round, floor and maybe other methods you can use.
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to Dynamic drop down menu?
    I know only one that I use and it is Ext JS library. The community on the forum there is very helpful - helped me a lot when I was starting.
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to comunicating between frames
    The syntax you've posted should work as far as the names of individual object are found.

    The easies way is to install Firebug, see if it produces any errors, set breakpoints and explore value of variables at various stages of the program execution.
    See more | Go to post

    Leave a comment:


  • jsakalos
    replied to Dynamic drop down menu?
    Wow,

    this is quite a task for a newbie ;)

    Are you using some JavaScript library? You see it is possible to code all Ajax requests and responses handling yoursel but a good Ajax framework (library) makes it much easier.
    See more | Go to post

    Leave a comment:


  • Well, this is quite broad question so forgive me if I answer also a bit broadly.

    Ajax is built around XMLHttpRequest object (or it's MS equvalent) and this object contains only basic methods and fires events.

    Therefore the best would be to find a good Ajax framework that wraps some convenient functions around this object and makes the programming easier.

    That doesn't mean that you cannot try to make requests...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...