navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

displaying a list of check boxes based on a sql query

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> displaying a list of check boxes based on a sql query
Page: [1]
 
zacky0

 

Posts: 1
Joined: 7/14/2003
Status: offline

 
displaying a list of check boxes based on a sql query - 7/14/2003 17:50:28   
Hi,

Iam trying to do the following.

I have a list of about 50 checkboxes that are displayed on the ASP form.
I need to enable the checkboxes as available and also disable the checkboxes as not available for the user based on the result from a SQL query using javascript.

NB : The sql query returns the name of the checkbox that are avl as a column of the result set.

The below code does not work currently.
I need some help to complete or change the following code to help solve my requirement.

<%
Sql = " select * from Sponsor_TBL"
Set rs = conn.Execute(SQL)
Do while not rs9.eof
if rs(4) <> " 0" then
cbox = rs9(0) %>
<script language = " javascript" >
document.all[" cbox" ].disabled = true;
</script>
<%
end if
rs9.movenext
loop %>



Thanks
zack.
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: displaying a list of check boxes based on a sql query - 7/15/2003 16:57:36   
If you dynamically write each checkbox, then just add " disabled" to the html code.

eg <input type=checkbox disabled>

Note that its not supported on all browsers.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to zacky0)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> displaying a list of check boxes based on a sql query
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts