/    Sign up×
Community /Pin to ProfileBookmark

Disable and Enavle a row?

Based on the radio button selection i need to enabled and disable the rows?
Any help?.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guySep 14.2005 — the rows? are there further form elements within the rows that you want disabled?

document.getElementById("idofthing").disable = 'disable'
Copy linkTweet thisAlerts:
@gmmsk7authorSep 14.2005 — based on the radio button selection i want to disable and enable first and 3rd rows.And also 4th row should be hidden.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Untitled Document</title>

</head>

<body>

<table width="50%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="20%"><input name="radiobutton" type="radio" value="radiobutton"></td>

<td width="47%">&nbsp;</td>

<td width="33%">&nbsp;</td>

</tr>

<tr>

<td>First Row </td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td>Second row </td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td>3rd row </td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr>

<td>4th row </td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

</table>

</body>

</html>

Can you please help me?
Copy linkTweet thisAlerts:
@bathurst_guySep 14.2005 — This so far will do the second part, hiding the fourth, but, I still dont understand what you mean by disable.
<i>
</i>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;script type="text/javascript"&gt;
function doit(radio){
if (radio.checked == true){
document.getElementById("fourth").style.visibility = 'hidden';
} else {
document.getElementById("fourth").style.visibility = 'visible';
}
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;table width="50%" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tr&gt;
&lt;td width="20%"&gt;&lt;input name="radiobutton" type="radio" value="radiobutton" id="radiobutton" onChange="doit(this);"&gt;&lt;/td&gt;
&lt;td width="47%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td width="33%"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id="first"&gt;
&lt;td&gt;First Row &lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id="second"&gt;
&lt;td&gt;Second row &lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id="third"&gt;
&lt;td&gt;3rd row &lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr id="fourth"&gt;
&lt;td&gt;4th row &lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
×

Success!

Help @gmmsk7 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...