multiple parameters in function

Discussion in 'Javascript' started by jodleren, Jul 2, 2008.

  1. jodleren

    jodleren Guest

    Hi

    I want to pass one or two parameters to a function, such as

    function OpenDirSel(input, user)
    {
    }

    The point: it does not work with 2 parameters, why?
    Is there a way, that I can make the 2nd parameter optional?

    WBR
    Sonnich
     
    jodleren, Jul 2, 2008
    #1
    1. Advertising

  2. jodleren

    Henry Guest

    On Jul 2, 10:04 am, jodleren wrote:
    > Hi
    >
    > I want to pass one or two parameters to a function, such as
    >
    > function OpenDirSel(input, user)
    > {
    > }
    >
    > The point: it does not work with 2 parameters, why?


    It does "work" with 2 parameters.

    > Is there a way, that I can make the 2nd parameter optional?


    The second parameter is already optional.

    You are going to have to come up with a better question as that one
    will not get you very far.
     
    Henry, Jul 2, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonck van der Kogel
    Replies:
    2
    Views:
    1,008
    Jonck van der Kogel
    May 27, 2004
  2. Bore Biko
    Replies:
    6
    Views:
    312
    David Shin
    Oct 31, 2005
  3. Jason
    Replies:
    2
    Views:
    555
    Jonathan Mcdougall
    May 13, 2006
  4. Victor Bazarov
    Replies:
    7
    Views:
    567
    Zhihao Yuan
    Nov 30, 2012
  5. Zhihao Yuan
    Replies:
    0
    Views:
    247
    Zhihao Yuan
    Nov 30, 2012
Loading...

Share This Page