473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Get Checkbox "Checked" value on form submit

How do I get whether a checkbox is ticked in a form on a form's submission
(true or false)? How do I use the Request object in ASP?
Jul 19 '05 #1
2 29320
"John E" <La********@hotmail.com> writes:
How do I get whether a checkbox is ticked in a form on a form's submission
(true or false)?
onsubmit="if(this.form.elements['checkboxName'].checked){alert('Check!');}"
How do I use the Request object in ASP?


I have never used ASP, but the code I have been subjected to just
said something like
Request.blah
That is how you access it in Javascript. What its properties are,
I leave to the ASP-group to answer.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 19 '05 #2
Well, this should work

<%
If request.form("thecheckbox") <> "" Then Response.write "Yes, it was
checked." %>

That's assuming you gave your checkbox a value greater than "".

Ray at work

"John E" <La********@hotmail.com> wrote in message
news:be***********@ID-83837.news.dfncis.de...
How do I get whether a checkbox is ticked in a form on a form's submission
(true or false)? How do I use the Request object in ASP?

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Mullen | last post by:
I want to take the following HTLM and use javascript to turn on radio buttons if checkbox is checked, can I do this with javascript (maybe onClick or an array) or do i need a server side script ?...
4
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! How do I convert a CheckBox.Checked to an int? Regards Martin Arvidsson
4
by: Kevin | last post by:
Hi, I have a input with type checkbox. I want it to be automatically checked if the value from the corresponding field in the database is also checked. I tried this: <% set objdc =...
3
by: David | last post by:
Hi If I change the checked value of the checkbox by code, I can not trigger the CheckedChanged event of a checkbox control. Is there any way to implement it? Thank you very much!
1
by: Eric via .NET 247 | last post by:
Hello, I'm dynamicly filling a table with checkboxes, doing this: ... CheckBox chkBox = new CheckBox(); chkBox.ID = "chk" + i.ToString(); chkBox.AutoPostBack=true; ...
2
by: Andrew | last post by:
Hi, I have a problem capturing the checkboxes that are checked, I get false irrespective of wether they are checked or not. I have gone thru the sample code on this forum, but they dun seem to...
0
by: =?Utf-8?B?SGVtYW50?= | last post by:
Hi all Thank you in advance. i need to know How to Bind Checked value of checkbox into sql Server database. please help me
6
by: painkiller | last post by:
language: vb.net environment: windows forms .net : v1.1 i am having a checkedlistbox control that display document category such as text, image, video, audio etc. these values are coming from...
3
by: nologo | last post by:
All, Have a problem i just cant find the answer for. I'm trying to populate a colum in a SQL database. Basically the column requires a 1 or 0. I'm trying to populate this col via a c#...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...

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.