Skip to main content
Inspiring
October 13, 2006
Answered

Javascript anyone?.

  • October 13, 2006
  • 4 replies
  • 1015 views
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 has been closed for replies.
Correct answer lands1ide
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"/>

4 replies

Deaf_Web_Designer
Inspiring
October 19, 2006
Hopefully that works great for you, and glad that you got it all sorted.
lands1ideAuthorCorrect answer
Inspiring
October 18, 2006
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"/>
Deaf_Web_Designer
Inspiring
October 16, 2006
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.
lands1ideAuthor
Inspiring
October 16, 2006
not really i call my code crap code. I know just a little.
Inspiring
October 14, 2006
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")' %> />
>


Inspiring
October 16, 2006
<input name="2ND" type="checkbox" value="R" <% if(value='r') then
response.write('disabled="disabled"') %> />

HOWEVER, your test "if(value='r')" is supposed to be testing WHAT?


--
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:eh09d6$a7u$1@forums.macromedia.com...
> Sorry for my stuprid questions but where should i remove the"" and where
> should i input the "(". Thanks.


Inspiring
October 16, 2006
This is ASP/JScript? Or ASP/VBScript?

--
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:eh0g73$ij6$1@forums.macromedia.com...
>I tried the code by ace but im still getting this error message.
>
> Microsoft JScript compilation error '800a03ec'
>
> Expected ';'
>
> /systems/lvcc/January/January.asp, line 169
>
> if (value='R') then response.write "(disabled=disabled)"
> ------------------------^
>
>