I am using the following to do a Hide/Show feature, and it works
exactly as I want...

------snip-----
<script type="text/javascript">
$(function(){
        $('#sender').click(function(){
                        $('#container div.toggleit').slideToggle('normal');
        });
});
</script>

<style type="text/css">
table#container div.hidden { display: none; }
</style>

<table id="container">
<tr>
<td><input type="checkbox" id="sender" />
<div class="toggleit"><input name="data01" type="text" value="show
first"></div>
<div class="toggleit hidden"><input name="data02" type="text"
value="show second"></div></td>
</tr>
<tr>
</table>
-----end snip-----

But now I need to be able to swap the name values of the text fields
on the toggle as well, so that the visible text field always carries
the name value of "data01".

I cannot figure out how to do this and hope someone can help out.

I hope this makes sense, and thank you in advance for any help...

Reply via email to