471,122 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,122 software developers and data experts.

Manipulating a button based on readonly attribute of a check box

Hi,
I have a asp page where a checkbox, when clicked will disable all text boxes
associated with the page.

The following is a part of a code for the checkbox with its name and
readonly attributes.
name="chk_Complete" <%= isReadOnly %>

I have to disable(or make sure does not disaplay) a save button in the same
page when this checkbox's attribute is readonly. I have no idea how to do
this.
I need some help/idea to handle this issue. Thanks.
Jul 22 '05 #1
1 1373
Are you trying to do it on server side ? I think you want client side for
that your code is not right.
You need something like

So for series of checkboxes, you want to write a function that would do it
like
<html>
<body>
<form name=form1>
<input type=checkbox name="aaa" value="aaa">
<input type=checkbox name="bbb" value="bbb">
<input type=button value="Disbale" onclick=disableall()>
</form>
</body>
</html>
<script>
function disableall()
{
document.form1.aaa.disabled=true
document.form1.bbb.disabled=true
}
</script>
"Jack" wrote:
Hi,
I have a asp page where a checkbox, when clicked will disable all text boxes
associated with the page.

The following is a part of a code for the checkbox with its name and
readonly attributes.
name="chk_Complete" <%= isReadOnly %>

I have to disable(or make sure does not disaplay) a save button in the same
page when this checkbox's attribute is readonly. I have no idea how to do
this.
I need some help/idea to handle this issue. Thanks.

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Learning SQL Server | last post: by
1 post views Thread by Bill_W_Stephens | last post: by
5 posts views Thread by John Smith | last post: by
2 posts views Thread by =?Utf-8?B?Q2hhcnRz?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.