Ok scott, you've piqued my interest. You've _got_ to share this interface that chokes jQuery. :)
nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] On Fri, Feb 13, 2009 at 12:57 PM, Scott Stewart <saste...@email.unc.edu>wrote: > > and that would/does work. > > I don't know if it's an error with the layout or jquery can't traverse > nested tables or what but I've never been able to get it to function > consistently in this layout > > Brian Swartzfager wrote: > >> jquery doesn't work with this layout, that's the first place I went. > >> > > > > Not to keep beating the jQuery horse, but if jQuery is referencing the > radio button by ID or some other non-positional selector, the layout > shouldn't matter. > > > > Just to be sure, I wrote up a quick little test with 2 sets of radio > buttons. This works find in FireFox and IE7: > > > > <script type="text/javascript" src="jquery-1.2.6.min.js"></script> > > <script type="text/javascript"> > > $(document).ready(function() { > > > > $("input[type='radio'][name='radio1']").click(function() { > > var $clickedRadioButton= $(this); > > if($clickedRadioButton.val()== "Yes") > > { > > $("#radio2AA").attr("checked",true); > > $("#radio2AA").attr("disabled",false); > > $("#radio2BB").attr("disabled",true); > > } > > else > > { > > $("#radio2BB").attr("checked",true); > > $("#radio2BB").attr("disabled",false); > > $("#radio2AA").attr("disabled",true); > > } > > }); > > > > }); > > > > </script> > > > > <form name="testForm" method="post" action="none"> > > <table id="table1" cellpadding="2" cellspacing="2" style="border:1px > solid black;"> > > <tr> > > <td> > > <table id="table2" cellpadding="2" cellspacing="2" > style="border:1px solid blue;"> > > <tr> > > <td>Just a random cell to be different.</td> > > <td> > > <table id="table3" cellpadding="2" cellspacing="2" > style="border:1px solid red;"> > > <tr> > > <td> > > Okay, in the next cell is our set of radio > buttons. > > </td> > > <td> > > <strong>Radio #1</strong><br /> > > <input type="radio" name="radio1" id="radio1AA" > value="Yes"> The answer is Yes<br /> > > <input type="radio" name="radio1" id="radio1BB" > value="No"> The answer is No<br /> > > <hr /> > > <strong>Radio #2</strong><br /> > > <input type="radio" name="radio2" id="radio2AA" > value="Yep"> You just answered "Yes"<br /> > > <input type="radio" name="radio2" id="radio2BB" > value="Nope"> You just answered "No"<br /> > > </td> > > </tr> > > </table> > > </td> > > </tr> > > </table> > > </td> > > </tr> > > </table> > > </form> > > > > ...the only reason I can think of for the layout to affect the script is > if one or more HTML elements are not closed properly: invalid HTML that > perhaps the browser can compensate for and display correctly, but wrecks the > DOM of the page. > > > > Of course, if it's IE 6 you're talking about, all bets are off. :) > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319299 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4