enable/disable dynamic form elements

Discussion in 'Javascript' started by prisk, Sep 16, 2006.

  1. prisk

    prisk Guest

    Hi,
    I have a form that has checkboxes and lists generated in php with the
    names like this
    <input name=chk<?$i$j?> onClick="EnableLst(name of checkbox)">
    <select name =lst<?$i$j?> disabled>
    in a loop that generates them
    now I want to be able when I click on the checkbox, it automatically
    enable the select which is disabled by default.
    I want to use a function in javascript, that will receive the name of
    checkbox in parameter and changes the state of the select element.
    The trick is that I dont know how to retreive the checkbox name :(
    Any suggestions ?
    Thanks.
    prisk, Sep 16, 2006
    #1
    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. Henrik Hjøllund Hansen

    Dynamically enable/disable an element inside a form.

    Henrik Hjøllund Hansen, Dec 18, 2003, in forum: HTML
    Replies:
    2
    Views:
    4,582
    Jukka K. Korpela
    Dec 19, 2003
  2. Age Bosma

    Enable/Disable form elements

    Age Bosma, Oct 10, 2003, in forum: Javascript
    Replies:
    0
    Views:
    117
    Age Bosma
    Oct 10, 2003
  3. Mark Hannon
    Replies:
    3
    Views:
    186
    Randy Webb
    Sep 3, 2004
  4. joe t.
    Replies:
    3
    Views:
    200
    Michael Winter
    Mar 17, 2005
  5. Replies:
    4
    Views:
    185
Loading...

Share This Page