473,387 Members | 1,561 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,387 software developers and data experts.

How to do use checkbox in a response.write that pulls all data

Hi,
I have a asp page. This page pulls all data from a query. Part of the code
is as follows:
<%
Response.Write "<table border='1' width='80%' height='1' cellspacing='1' >"
Response.Write
"<th>Key</th><th>SubgrantID</th><th>Title</th><th>Unlock</th><th>Unverify"
%>
<%
do until sRS.eof
Key = sRS("SubgrantIntId")
Subgrant = sRS("ComboID")
Title = sRS("Title")
Unlock = sRS("IsChecked")
Unverify = sRS("IsVerified")
%>

<tr>
<td align="center">
<div style="cursor:hand"><p align="left"
OnClick="location.href='mainreportagain1.asp?Grant ID=<%Response.Write Key%>'">

<u><font color="#0000FF">
<%Response.Write Key%></font></u></div></td>
<% 'this writes out the key%>
</td>

<td align='center'>
<font color="#000000">
<%Response.Write Subgrant%>

<td align='left'>
<font color="#000000">
<%Response.Write Title%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unlock%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unverify%>
</td>

</tr>

In the above code, in the statements response.write Unlock and
response.write unverify I would like to bring checkboxes. The back end data
for these two fields in the database are actually checkboxes. I would
appreciate any help to handle the situation where the rows should show
checkbox values for the two fields mentioned above. Thanks.
Jan 24 '06 #1
2 1942
<td align='left'>
<font color="#000000">
<input type="checkbox" id="chkUnlock" name="chkUnlock"
value="<%=Unlock%>">
<label for="chkUnlock"><%=Unlock%></label>
</td>

That would give you a checkbox with a value of your Unlock variable. The
text displayed next to it would also display that value. Instead of using
"Response.Write" I used the shorthand "=".

Ray at work

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
Hi,
I have a asp page. This page pulls all data from a query. Part of the code
is as follows:

<td align='left'>
<font color="#000000">
<%Response.Write Unlock%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unverify%>
</td>

</tr>

In the above code, in the statements response.write Unlock and
response.write unverify I would like to bring checkboxes. The back end
data
for these two fields in the database are actually checkboxes. I would
appreciate any help to handle the situation where the rows should show
checkbox values for the two fields mentioned above. Thanks.

Jan 24 '06 #2
Thanks for your help Ray. I appreciate it. Regards.

"Ray Costanzo [MVP]" wrote:
<td align='left'>
<font color="#000000">
<input type="checkbox" id="chkUnlock" name="chkUnlock"
value="<%=Unlock%>">
<label for="chkUnlock"><%=Unlock%></label>
</td>

That would give you a checkbox with a value of your Unlock variable. The
text displayed next to it would also display that value. Instead of using
"Response.Write" I used the shorthand "=".

Ray at work

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
Hi,
I have a asp page. This page pulls all data from a query. Part of the code
is as follows:

<td align='left'>
<font color="#000000">
<%Response.Write Unlock%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unverify%>
</td>

</tr>

In the above code, in the statements response.write Unlock and
response.write unverify I would like to bring checkboxes. The back end
data
for these two fields in the database are actually checkboxes. I would
appreciate any help to handle the situation where the rows should show
checkbox values for the two fields mentioned above. Thanks.


Jan 25 '06 #3

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

Similar topics

1
by: Jason Dykes | last post by:
I have a page that is database driven. The pages shows a user's name and whether they have access to our site or not. this is done by displaying two checkboxes positioned to the right of the users...
2
by: HartNA | last post by:
I have a script that will work on it is own, but the problem is the site I am trying to implement the checkbox on a site with attachments on the same form. In my testing I check LOW. The result I...
4
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
1
by: sneha123 | last post by:
There will be some 20 questions and for each question there will be 4 choices.what i want to do is to select multiple answers by clicking the checkbox. i m using asp.net,vb.net pls help me we...
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
4
by: cbtechlists | last post by:
I have an ASP app that we've moved from a Windows 2000 to a Windows 2003 server (sql server 2000 to sql server 2005). The job runs fine on the old servers. Part of the app takes a recordset and...
1
by: peck2000 | last post by:
Related to my earleir post ... this is the same project to re-purpose the Classifieds application in BEGINNING ASP 3.0 (Wrox) to a comicbook database ... This is a brainteaser that should have...
0
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
11
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, I have a large recordset to be displayed on a ASP 3.0 page. I am using recordset paging for this. For the next and previous link i am passing href as <a href=<Page URl>?page=<%=...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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,...

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.