Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with this error anyone?

Participant ,
Sep 27, 2006 Sep 27, 2006
How do you disable a checkbox if the value in the database is = to r or a or d. Im using access and .asp
TOPICS
Server side applications
410
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2006 Sep 27, 2006
If using XHTML -

<input name="foo" type="checkbox" value="whatever" <% if(value='r' or
value='d' or value='a') then response.write('disabled="disabled") %> />

If using HTML, change "/>" to ">".

--
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:efe7tq$b1n$1@forums.macromedia.com...
> How do you disable a checkbox if the value in the database is = to r or a
> or d. Im using access and .asp


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 27, 2006 Sep 27, 2006
I tryied this but i get the following error

Microsoft JScript compilation error '800a03ee'

Expected ')'

/systems/lvcc/January/January.asp, line 204

if(value='r' or

Any ideas?

This is what my code looks like
<input name="1st" type="checkbox" value="R" <% if(value='r' or
value='d' or value='a') then response.write('disabled="disabled") %> />
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2006 Sep 27, 2006
Yes - my mistake -

<input name="foo" type="checkbox" value="whatever" <% if(value='r') or
if(value='d') or if(value='a') then response.write('disabled="disabled") %>
/>



--
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:efebdu$fn8$1@forums.macromedia.com...
>I tryied this but i get the following error
>
> Microsoft JScript compilation error '800a03ee'
>
> Expected ')'
>
> /systems/lvcc/January/January.asp, line 204
>
> if(value='r' or
>
> Any ideas?


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 27, 2006 Sep 27, 2006
Thanks for your reply. I am getting a different error now this is the error I get now. I have attached my code at the bottom.
Microsoft JScript compilation error '800a03ec'

Expected ';'

/systems/lvcc/January/January.asp, line 205

if(value='d') or if(value='a') then response.write('disabled="disabled"')
-----------------^


<input name="1st" type="checkbox" value="R" <% if(value='r') or
if(value='d') or if(value='a') then response.write('disabled="disabled")%>
/>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2006 Sep 27, 2006
Wait a minute - I thought you were testing a value from a database? But it
appears that you are wanting that field to be disabled when its value is
"R"?

How is the field being written to the page?

--
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:efej27$pip$1@forums.macromedia.com...
> Thanks for your reply. I am getting a different error now this is the
> error I
> get now. I have attached my code at the bottom.
> Microsoft JScript compilation error '800a03ec'
>
> Expected ';'
>
> /systems/lvcc/January/January.asp, line 205
>
> if(value='d') or if(value='a') then response.write('disabled="disabled"')
> -----------------^
>
>
> <input name="1st" type="checkbox" value="R" <% if(value='r') or
> if(value='d') or if(value='a') then response.write('disabled="disabled")%>
> />
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 27, 2006 Sep 27, 2006
LATEST
Im sorry let me explain this a little better. The page is to request leave. I am using an update record method. origionaly all boxes will be blank when they request leave. when they hit submit it inputs a r into the database. We go into the database and change the r's to a's or d's based on if it is approved. If they want to request additional leave. they pull up the same page. I wanted it to prevent employees from checking or unchecking a box that they have already been approved or denied for. I am trying to keep each employee to only one record since the insert record make duplicates and is hard to sort through. I hope that helps. Thanks again for your help. I am very gratful. .
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines