Possible Duplicate:
How to avoid sending input fields which are hidden by display:none to a server?
<div style="display:none;">
<input type="text"/>
</div>
With the code above the input will be posted when the form is submitted. But How can I avoid submitting the input element whose parent is hidden? Any idea will be appreciated.