Skip to main content
Inspiring
Oct 13, 2006 11:20 PM UTC
Answered

Javascript anyone?.

Im trying to disable a checkbox if the data in the accsess database = r . This is what i have.
<input name="2ND" type="checkbox" value="R" <% if(value='r') then response.write'disabled="disabled")' %> />
This topic is closed to new replies. Start a new post to keep the conversation going.
lands1ideCorrect answer
Inspiring
Oct 18, 2006 9:50 PM UTC
I figured it out here is the code if anyone needs it
<input <%=(((Recordset2.Fields.Item("Jan1").Value) == "R" || Recordset2.Fields.Item("Jan1").Value == "A" || Recordset2.Fields.Item("Jan1").Value == "2")?"checked=\"checked\"":"")%>name="1ST" type="checkbox" id="1ST" value="R"/>

14 replies

Deaf_Web_Designer
Inspiring
Oct 19, 2006 6:01 AM UTC
Hopefully that works great for you, and glad that you got it all sorted.
Translate
lands1ideAuthorCorrect answer
Inspiring
Oct 18, 2006 9:50 PM UTC
I figured it out here is the code if anyone needs it
<input <%=(((Recordset2.Fields.Item("Jan1").Value) == "R" || Recordset2.Fields.Item("Jan1").Value == "A" || Recordset2.Fields.Item("Jan1").Value == "2")?"checked=\"checked\"":"")%>name="1ST" type="checkbox" id="1ST" value="R"/>
Translate
Deaf_Web_Designer
Inspiring
Oct 16, 2006 5:17 PM UTC
Lands1ide,

Are you fluent in coding or working with database apps, no? Murray or myself or other could recommend you a book or two, but we might want to know if you are talented coder working with database apps.
Translate
lands1ideAuthor
Inspiring
Oct 16, 2006 5:33 PM UTC
not really i call my code crap code. I know just a little.
Translate
Inspiring
Oct 14, 2006 12:32 AM UTC
You're missing a "(" and you have an extra "'".

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"lands1ide" <webforumsuser@macromedia.com> wrote in message
news:egp70k$6nt$1@forums.macromedia.com...
> Im trying to disable a checkbox if the data in the accsess database = r .
> This
> is what i have.
> <input name="2ND" type="checkbox" value="R" <% if(value='r') then
> response.write'disabled="disabled")' %> />
>


Translate
lands1ideAuthor
Inspiring
Oct 16, 2006 3:44 PM UTC
Sorry for my stuprid questions but where should i remove the"" and where should i input the "(". Thanks.
Translate