Javascript checkbox to hide fields if checked

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DettCom

    Javascript checkbox to hide fields if checked

    Hello all,

    I saw this post on google that contained the following code and I
    tried it but it did not work. I am trying create two contact forms and
    it the info in the first form is the same contact info that would be
    on the second, the enduser can check a box to hide all of the
    addtional fields. Below if the original code.



    <input type="checkbox"
    onclick="if(doc ument.all)del.s tyle.display='n one'"">
    <div id ="del">
    Your address <input type="text" name="address">
    .....the rest of the deleivery fields
    </div>


    Thanks!!!
  • Kien

    #2
    Re: Javascript checkbox to hide fields if checked

    DettCom wrote:[color=blue]
    > Hello all,
    >
    > I saw this post on google that contained the following code and I
    > tried it but it did not work. I am trying create two contact forms and
    > it the info in the first form is the same contact info that would be
    > on the second, the enduser can check a box to hide all of the
    > addtional fields. Below if the original code.
    >
    >
    >
    > <input type="checkbox"
    > onclick="if(doc ument.all)del.s tyle.display='n one'"">
    > <div id ="del">
    > Your address <input type="text" name="address">
    > ....the rest of the deleivery fields
    > </div>
    >
    >
    > Thanks!!![/color]

    Hi,

    It worked OK on IE6 on XP

    Kien

    Comment

    Working...