Hi all,
Here is my JS:
<script type="text/javascript">
function display(action, id) { if
(action == 'show') {
document.getElementById("explanation"+id).style.display
= "block"; document.getElementById("link"+id).href=
"javascript:display('hide', "+id+")";
document.getElementById("link"+id).innerHTML
= "Close"; }
if (action == 'hide') {
document.getElementById("explanation"+id).style.display
= "none"; document.getElementById("link"+id).href=
"javascript:display('show', "+id+")";
document.getElementById("link"+id).innerHTML
= "Explain"; } }
</script>
and HTML:
<form name="test" id="test"
method="post"
enctype="multipart/form-data">
{assign var="clone" value="0"}
{section name=another loop=$dealImageTest}
{assign var="cloneTemp" value=$clone++}
<table><tr>
<td width="121" align="left">
<div id="explanation{$cloneTemp}" >
<img src="{$dealImageTest[another]}"
width="62" height="40" /><a
id="link{$cloneTemp}"
href="javascript:display('hide',
{$cloneTemp})">Remove</a>
<input type="hidden" name="dealImage_{$clone++}" id="{$dealImageTest[another]}"
value="{$dealImageTest[another]}">
</div>
</td> </tr></table>
{/section}
</form>
When i click the remove button the image is hiding. But when i submit the form i am getting the hidden type's value.
But According to div if the style is hidden it will not pass any value.
How can is solve this issues. Any idea will be helpful and greatful. thanks in advance