adding onchange ONLY if function zzz exist

Discussion in 'Javascript' started by Mel, Apr 3, 2007.

  1. Mel

    Mel Guest

    I would like to add onChange to a select only if a javascript function
    zzz exist.

    can this be done ?

    example is highly appreciated
     
    Mel, Apr 3, 2007
    #1
    1. Advertisements

  2. On Apr 3, 9:01 am, "Mel" <> wrote:
    > I would like to add onChange to a select only if a javascript function
    > zzz exist.
    >
    > can this be done ?
    >
    > example is highly appreciated


    if(window.zzz && /function/i.test(typeof(zzz))){
    // add onchange event to select element

    }
     
    scripts.contact, Apr 3, 2007
    #2
    1. Advertisements

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. Y.S.
    Replies:
    3
    Views:
    1,310
    strajan
    Sep 17, 2003
  2. LT
    Replies:
    7
    Views:
    2,359
    Phlip
    Jul 25, 2004
  3. Rick Mavrovik

    using Eval ("ZZZ")

    Rick Mavrovik, Jul 3, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    478
    Rick Mavrovik
    Jul 4, 2007
  4. abdulet
    Replies:
    2
    Views:
    734
    abdulet
    Oct 23, 2009
  5. Markus Mohr
    Replies:
    7
    Views:
    528
    Thomas 'PointedEars' Lahn
    Nov 28, 2003
  6. Jake
    Replies:
    5
    Views:
    301
  7. bkaneweb

    Onchange function goes only once

    bkaneweb, Jun 14, 2007, in forum: Javascript
    Replies:
    1
    Views:
    134
    bkaneweb
    Jun 14, 2007
  8. The Natural Philosopher

    <select..onchange() > with only one <option>

    The Natural Philosopher, Sep 27, 2007, in forum: Javascript
    Replies:
    15
    Views:
    479
    The Natural Philosopher
    Oct 2, 2007
Loading...