I am doing this for a custom layout that I can only upload basic HTML/ JavaScript to.
When the page is rendered, the server unfortunately strips 'non- allowed' ID settings from the tags. Is it possible to do without setting ID values in the input tags? - VB On Sep 9, 8:14 am, mbraybrook <[EMAIL PROTECTED]> wrote: > You may have to replace slideToggle with a conditional .hide() .show() > and some other information. > > Pseudo-code: > .: Check the state of the two divs seperately, perhaps by providing > unique ID's for each one? > .: If one is hidden, show it and set the "name" attribute to "data01" > .: if one is shown, hide it and set the "name" attribute to "data02" > > Sorry, no code, writing this in a bit of a rush. I can supply code > later if you would like? > > Hope this helps, though i may have missed the point of the question!? > > Regards > Mark > > On Sep 8, 11:01 pm, Velcrobelly <[EMAIL PROTECTED]> wrote: > > > 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...