Hello,
Thanks for looking into this.
Using JavaScript, I am trying to make a new table row appear with entry
fields when a radio button is clicked, and then make it disappear when the
radio button is clicked again. That part works fine.
The problem is that I also need to do the following: After a radio button
is clicked, and the table row is showing, I need to be able to click a second
radio button to bring up a second table row and at the same time hide the first
table row. Right now if I click a radio button, the row will keep showing when
I click a second radio button, so that two table rows show at the same time.
The Radio button for each row has a value that it gets from the query
output. That value is sent to a JavaScript function. I think if I could find
some way of either ColdFusion or JavaScript holding that value in a variable
and then using it the next time a radio button is clicked to hide the table
row, that might do it.
Of course, Iâm interested in any solution, but the way I see the problem
is that I have to have some way to have JavaScript or ColdFusion remember the
first value.
Hereâs my JavaScript:
function displayRow(i)
{
var row = document.getElementById("showRow1"+i);
if (row.style.display == '')
{
row.style.display = 'none';
}
else {
row.style.display = '';
}
}
Hereâs my code for the control.
<cfoutput query="getDefaultEnergyClass">
<tr>
<td>
<input type="radio" name="selectedIndex" value="#energyID#"
onclick="displayRow(#energyID#);">#EnergyClassName# </td>
Hereâs the row that getâs brought up on click:
</tr>
<tr id="showRow1#energyID#" style="display:none">
<td colspan="4" align="right"><input name="ESCPerc" type="text" value="[Enter
new percentage]"><input name="ESCEDate" type="text" value="[Enter Effective
Date]"><input type="submit" value="Add"> </td>
</tr>
</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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-newbie/message.cfm/messageid:4194
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15