Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Manipulating a button based on readonly attribute of a check box

Reply
Thread Tools

Manipulating a button based on readonly attribute of a check box

 
 
Jack
Guest
Posts: n/a
 
      06-22-2005
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.
 
Reply With Quote
 
 
 
 
JitGanguly
Guest
Posts: n/a
 
      06-22-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
picking value of one attribute based on a child elements attribute? XPath? vjethava@gmail.com XML 2 03-06-2006 05:19 AM
how to selecet check box in the data grid ?? only one check box mit ASP .Net 1 01-25-2006 06:47 PM
Repost: Manipulating save button based on readonly attribute Jack ASP General 3 06-23-2005 07:24 PM
ASP.NET Readonly panel function with readonly checkbox, readonly radiobutton Jonathan Hyatt ASP .Net Web Controls 1 06-08-2004 07:42 PM
set ReadOnly to radio button and check box Grey ASP .Net 1 05-31-2004 10:00 AM



Advertisments