Hello.
I need to set a checkbox to the "checked" state and prevent the user from
unchecking it. I tried using "disabled", but then the value is not passed on
the Post to an ASP page.
Anyone have any ideas?
Thanks in advance,
Mike 7 6611
If the user cannot uncheck it, why does it exist? You can use disabled, but
then use a hidden input to carry through the value if you have to carry it
through. Depending on what you're doing, you may not have to carry it
through, because if your code knows that it should write the checkbox
disabled, you can make that same determination on the page that to which the
form posts.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message
news:uE******** ******@tk2msftn gp13.phx.gbl... Hello.
I need to set a checkbox to the "checked" state and prevent the user from unchecking it. I tried using "disabled", but then the value is not passed
on the Post to an ASP page.
Anyone have any ideas?
Thanks in advance,
Mike
Hi, Ray. Thanks for responding.
The checkbox(es) reflect surcharges that may or may not be automatically
checked, based on criteria. The user needs to know that a surcharge applies.
That's why it exists.
I was trying to avoid a hidden field because there are other checkboxes in
the same checkbox group that are not automatically checked. Maintaining the
value of the hidden field is a pain.
Making the same determination can be costly. I do it once, up front.
Any other thoughts?
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:O7******** ******@TK2MSFTN GP12.phx.gbl... If the user cannot uncheck it, why does it exist? You can use disabled,
but then use a hidden input to carry through the value if you have to carry it through. Depending on what you're doing, you may not have to carry it through, because if your code knows that it should write the checkbox disabled, you can make that same determination on the page that to which
the form posts.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message news:uE******** ******@tk2msftn gp13.phx.gbl... Hello.
I need to set a checkbox to the "checked" state and prevent the user
from unchecking it. I tried using "disabled", but then the value is not
passed on the Post to an ASP page.
Anyone have any ideas?
Thanks in advance,
Mike
I see. I still suggest using hidden fields then, I'd say. If you name the
hidden field the same name as your checkboxes, it won't matter that it's not
a checkbox. Also, IIRC, the enabled=false (or is it disabled=true) isn't
totally cross-browser compatible. So, perhaps you'll want to display the
uncheckable items in a different way, like just in a bulleted list or
something.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message
news:eS******** ******@TK2MSFTN GP12.phx.gbl... Hi, Ray. Thanks for responding.
The checkbox(es) reflect surcharges that may or may not be automatically checked, based on criteria. The user needs to know that a surcharge
applies. That's why it exists.
I was trying to avoid a hidden field because there are other checkboxes in the same checkbox group that are not automatically checked. Maintaining
the value of the hidden field is a pain.
Making the same determination can be costly. I do it once, up front.
Any other thoughts?
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message news:O7******** ******@TK2MSFTN GP12.phx.gbl... If the user cannot uncheck it, why does it exist? You can use disabled, but then use a hidden input to carry through the value if you have to carry
it through. Depending on what you're doing, you may not have to carry it through, because if your code knows that it should write the checkbox disabled, you can make that same determination on the page that to which the form posts.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message news:uE******** ******@tk2msftn gp13.phx.gbl... Hello.
I need to set a checkbox to the "checked" state and prevent the user from unchecking it. I tried using "disabled", but then the value is not
passed on the Post to an ASP page.
Anyone have any ideas?
Thanks in advance,
Mike
if you want to maintain a consistent view, maybe a gif of a checked box
rather than a check box?
regards
paul
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:u8******** ******@TK2MSFTN GP12.phx.gbl... I see. I still suggest using hidden fields then, I'd say. If you name
the hidden field the same name as your checkboxes, it won't matter that it's
not a checkbox. Also, IIRC, the enabled=false (or is it disabled=true) isn't totally cross-browser compatible. So, perhaps you'll want to display the uncheckable items in a different way, like just in a bulleted list or something.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message news:eS******** ******@TK2MSFTN GP12.phx.gbl... Hi, Ray. Thanks for responding.
The checkbox(es) reflect surcharges that may or may not be automatically checked, based on criteria. The user needs to know that a surcharge applies. That's why it exists.
I was trying to avoid a hidden field because there are other checkboxes
in the same checkbox group that are not automatically checked. Maintaining the value of the hidden field is a pain.
Making the same determination can be costly. I do it once, up front.
Any other thoughts?
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message news:O7******** ******@TK2MSFTN GP12.phx.gbl... If the user cannot uncheck it, why does it exist? You can use
disabled, but then use a hidden input to carry through the value if you have to
carry it through. Depending on what you're doing, you may not have to carry it through, because if your code knows that it should write the checkbox disabled, you can make that same determination on the page that to
which the form posts.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message news:uE******** ******@tk2msftn gp13.phx.gbl... > Hello. > > I need to set a checkbox to the "checked" state and prevent the user from > unchecking it. I tried using "disabled", but then the value is not passed on > the Post to an ASP page. > > Anyone have any ideas? > > Thanks in advance, > > Mike > >
I was thinking that also, but checkboxes look different in different
browsers and they also look different in IE if the person is running XP with
the Candyland theme.
Ray at work
"Paul" <pa**@nospam.co m> wrote in message
news:us******** ******@TK2MSFTN GP10.phx.gbl... if you want to maintain a consistent view, maybe a gif of a checked box rather than a check box?
regards paul
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message news:u8******** ******@TK2MSFTN GP12.phx.gbl... I see. I still suggest using hidden fields then, I'd say. If you name the hidden field the same name as your checkboxes, it won't matter that it's not a checkbox. Also, IIRC, the enabled=false (or is it disabled=true)
isn't totally cross-browser compatible. So, perhaps you'll want to display
the uncheckable items in a different way, like just in a bulleted list or something.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message news:eS******** ******@TK2MSFTN GP12.phx.gbl... Hi, Ray. Thanks for responding.
The checkbox(es) reflect surcharges that may or may not be
automatically checked, based on criteria. The user needs to know that a surcharge applies. That's why it exists.
I was trying to avoid a hidden field because there are other
checkboxes in the same checkbox group that are not automatically checked.
Maintaining the value of the hidden field is a pain.
Making the same determination can be costly. I do it once, up front.
Any other thoughts?
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in
message news:O7******** ******@TK2MSFTN GP12.phx.gbl... > If the user cannot uncheck it, why does it exist? You can use
disabled, but > then use a hidden input to carry through the value if you have to carry it > through. Depending on what you're doing, you may not have to carry
it > through, because if your code knows that it should write the
checkbox > disabled, you can make that same determination on the page that to which the > form posts. > > Ray at work > > "Mike Lopez" <Mi**********@i nds.com> wrote in message > news:uE******** ******@tk2msftn gp13.phx.gbl... > > Hello. > > > > I need to set a checkbox to the "checked" state and prevent the
user from > > unchecking it. I tried using "disabled", but then the value is not passed > on > > the Post to an ASP page. > > > > Anyone have any ideas? > > > > Thanks in advance, > > > > Mike > > > > > >
ah. good point. I need to get out of the "I own the intranet and it's IE
only" frame of mind.
damn these dependencies
regards
paul
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:Oq******** ******@TK2MSFTN GP10.phx.gbl... I was thinking that also, but checkboxes look different in different browsers and they also look different in IE if the person is running XP
with the Candyland theme.
Ray at work
"Paul" <pa**@nospam.co m> wrote in message news:us******** ******@TK2MSFTN GP10.phx.gbl... if you want to maintain a consistent view, maybe a gif of a checked box rather than a check box?
regards paul
"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message news:u8******** ******@TK2MSFTN GP12.phx.gbl... I see. I still suggest using hidden fields then, I'd say. If you
name the hidden field the same name as your checkboxes, it won't matter that
it's not a checkbox. Also, IIRC, the enabled=false (or is it disabled=true) isn't totally cross-browser compatible. So, perhaps you'll want to display the uncheckable items in a different way, like just in a bulleted list or something.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message news:eS******** ******@TK2MSFTN GP12.phx.gbl... > Hi, Ray. Thanks for responding. > > The checkbox(es) reflect surcharges that may or may not be automatically > checked, based on criteria. The user needs to know that a surcharge applies. > That's why it exists. > > I was trying to avoid a hidden field because there are other checkboxes in > the same checkbox group that are not automatically checked. Maintaining the > value of the hidden field is a pain. > > Making the same determination can be costly. I do it once, up front. > > Any other thoughts? > > "Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message > news:O7******** ******@TK2MSFTN GP12.phx.gbl... > > If the user cannot uncheck it, why does it exist? You can use disabled, > but > > then use a hidden input to carry through the value if you have to carry it > > through. Depending on what you're doing, you may not have to
carry it > > through, because if your code knows that it should write the checkbox > > disabled, you can make that same determination on the page that to
which > the > > form posts. > > > > Ray at work > > > > "Mike Lopez" <Mi**********@i nds.com> wrote in message > > news:uE******** ******@tk2msftn gp13.phx.gbl... > > > Hello. > > > > > > I need to set a checkbox to the "checked" state and prevent the user > from > > > unchecking it. I tried using "disabled", but then the value is
not > passed > > on > > > the Post to an ASP page. > > > > > > Anyone have any ideas? > > > > > > Thanks in advance, > > > > > > Mike > > > > > > > > > > > >
Ray Wrote:
"If the user cannot uncheck it, why does it exist?"
I asked the same question but then I thought about what
Ford does when you customize a vehicle on there Web-site.
They will disable a checkbox to keep you from selecting an
option that does go with the package you just chose. -----Original Message----- If the user cannot uncheck it, why does it exist? You
can use disabled, butthen use a hidden input to carry through the value if you
have to carry itthrough. Depending on what you're doing, you may not
have to carry itthrough, because if your code knows that it should write
the checkboxdisabled, you can make that same determination on the
page that to which theform posts.
Ray at work
"Mike Lopez" <Mi**********@i nds.com> wrote in message news:uE******* *******@tk2msft ngp13.phx.gbl.. . Hello.
I need to set a checkbox to the "checked" state and
prevent the user from unchecking it. I tried using "disabled", but then the
value is not passedon the Post to an ASP page.
Anyone have any ideas?
Thanks in advance,
Mike
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Eric Linders |
last post by:
Hi,
In my form, I have a checkbox that must be checked in order to process
the form. By default, I want it to be checked when the page first
appears. I can do that easily enough by hardcoding the "checked"
property.
My problem occurs when I try to validate it.
If the visitor unchecks the checkbox, the form cannot be processed,
|
by: Jack |
last post by:
Hi,
I have a form when loaded, retrieves record from an access table. Among
other fields there is a check box called FinalUpdate. This is tied to a field
in Access of type Yes/No.
The form retieves the values perfectly. This form is being used to update
the record in the table via a successconfirmation.asp.
Now, when the checkbox is loaded as checked, then unchecking the checkbox
reflects the change in query result in...
|
by: sianan |
last post by:
I tried to use the following example, to add a checkbox column to a
DataGrid in an ASP.NET application:
http://www.codeproject.com/aspnet/datagridcheckbox.asp
For some reason, I simply CAN'T get the example to work. I created the
following two classes, provided with the example:
*-*-**-*-*-*-*-*-*-*-*-*-**-*-*-*-*-CheckBoxColumn
Class:-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-**-*-*-*
|
by: EdB |
last post by:
In VB6, you could set a check box to checked, unchecked, or greyed. The
latter would be used to show a setting but disable the control.
In .Net, the third choice is not greyed, but indeterminate. And the doc
says it shows it as greyed, but checked. So how do you show greyed and
unchecked?
Disabling the control in total greys out the control's text which is less
than desirable.
|
by: chengsi |
last post by:
Hi,
I have a "continuous" subform which is linked to a table which has a checkbox field. I would like to create a Check All/Uncheck All checkbox control that both checks and disables the checkboxes in the subform.
At the moment I can disable/enable all textboxes, however my coding only checks/unchecks the FIRST checkbox in the subform, and ignores the other checkboxes in the list. My current VBA code is:
Private Sub...
| |
by: =?Utf-8?B?VG9ueSBBLg==?= |
last post by:
I have a datagridview on a Windows form where one of the columns is a
checkbox. After checking or unchecking the checkbox I try to update the
database. The following error appears
System.InvalidOperationException was unhandled
Edits to Textbox columns update without a problem. Any suggestion on what
I'm doing wrong. Thanks...
--
|
by: Ryanfromscotland |
last post by:
Hey there everyone, this is my first post so be nice :-) I have wrote quite a bit so the actual question is written out at the end if you want to skip on and see if you can answer it without the rest of the info.
I'm a hobbiest programmer and have taken up the project of writing a savestate editor - if you don't know what that is it's not really important - but I am having a bit of trouble with some code and google isn't turning up the answer...
|
by: Frinavale |
last post by:
I'm working on an ASP.NET application using VB.NET for server side code.
I have a GridView listing a bunch of stuff. Above the GridView I have a checkbox named "ChkBx_SelectAll". If this checkbox is checked, all of the rows in the GridView are checked, if this checkbox is unchecked, all of the rows in the GridView are unchecked.
This checking/unchecking of the checkboxes in the GridView is handled by a JavaScript method:
function...
|
by: Death Slaught |
last post by:
I play a game that when your backpack fills with items (the limit is 45) you must choose items to discard by unchecking their box. This is very annoying and time consuming so I was wondering if it were possible to create a Javascript function to be saved as a bookmark, and when used it prompts for the checkbox to start at (so it won't discard items that I want to keep) and discards all items after that point. So my main question is, is it...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |