Javascript checkbox to hide fields if checked

D

DettCom

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(document.all)del.style.display='none'"">
<div id ="del">
Your address <input type="text" name="address">
.....the rest of the deleivery fields
</div>


Thanks!!!
 
K

Kien

DettCom said:
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(document.all)del.style.display='none'"">
<div id ="del">
Your address <input type="text" name="address">
....the rest of the deleivery fields
</div>


Thanks!!!

Hi,

It worked OK on IE6 on XP

Kien
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top