Home All Groups Group Topic Archive Search About

Still not resolved. Need expert help



Author
1 Mar 2005 7:13 PM
Jack
I have a asp form where among others there are few text boxes and one check
box. The checkbox is
to indicate whether the entry is final. The checkbox is attahced to a field
in table of type yes/no.
After saving the documents,the form is refreshed. At this point, if the
checkbox has been saved with checked,
it shows unchecked, if it has been saved unchecked it shows unchecked.

Here, if the checkbox shows checked, I want to disable (or lock) all the
text boxes and the checkbox itself
which will prevent further entry.

Can this be done with asp? Any suggestion/help is highly appeciated.
Previous postings did not help
to get this resolved. Regards.

Author
1 Mar 2005 7:33 PM
Curt_C [MVP]
You will have to get the value of the checkbox when the page loads. I would
use a simple string value to hold a " disabled " or " " text string. Then in
ALL of your controls do a <input..... <%= YourValue %> ...>


--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


Show quote
"Jack" <J***@discussions.microsoft.com> wrote in message
news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
>I have a asp form where among others there are few text boxes and one check
> box. The checkbox is
> to indicate whether the entry is final. The checkbox is attahced to a
> field
> in table of type yes/no.
> After saving the documents,the form is refreshed. At this point, if the
> checkbox has been saved with checked,
> it shows unchecked, if it has been saved unchecked it shows unchecked.
>
> Here, if the checkbox shows checked, I want to disable (or lock) all the
> text boxes and the checkbox itself
> which will prevent further entry.
>
> Can this be done with asp? Any suggestion/help is highly appeciated.
> Previous postings did not help
> to get this resolved. Regards.
Author
1 Mar 2005 7:59 PM
Jack
Thanks for your insight Curt, I appreciate it. Here is the code of the
checkbox:
<i><input type="checkbox"  name="chk_Complete" value="TRUE" <%Response.Write
l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked" Else
Response.Write " unchecked"%>>

while one of the textbox in the asp page is coded as:
<input    type="text" name="txt_CurrentOutlay" size="13" 
value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
style="font-family: Times New Roman; font-size: 12pt"></font></td>
Now, are you suggesting to use the value of l_IsChecked to be utilized in
the input tag of the text boxes? Need a little clarification here. Regards





Show quote
"Curt_C [MVP]" wrote:

> You will have to get the value of the checkbox when the page loads. I would
> use a simple string value to hold a " disabled " or " " text string. Then in
> ALL of your controls do a <input..... <%= YourValue %> ...>
>
>
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Jack" <J***@discussions.microsoft.com> wrote in message
> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
> >I have a asp form where among others there are few text boxes and one check
> > box. The checkbox is
> > to indicate whether the entry is final. The checkbox is attahced to a
> > field
> > in table of type yes/no.
> > After saving the documents,the form is refreshed. At this point, if the
> > checkbox has been saved with checked,
> > it shows unchecked, if it has been saved unchecked it shows unchecked.
> >
> > Here, if the checkbox shows checked, I want to disable (or lock) all the
> > text boxes and the checkbox itself
> > which will prevent further entry.
> >
> > Can this be done with asp? Any suggestion/help is highly appeciated.
> > Previous postings did not help
> > to get this resolved. Regards.
>
>
>
Author
1 Mar 2005 8:16 PM
Curt_C [MVP]
correct...
<%
if cbool(l_IsChecked)
    isDisabled = " disabled "
else
    isDisabled = " "

Show quote
<input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......


--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


Show quote
"Jack" <J***@discussions.microsoft.com> wrote in message
news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
> Thanks for your insight Curt, I appreciate it. Here is the code of the
> checkbox:
> <i><input type="checkbox"  name="chk_Complete" value="TRUE"
> <%Response.Write
> l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked" Else
> Response.Write " unchecked"%>>
>
> while one of the textbox in the asp page is coded as:
> <input type="text" name="txt_CurrentOutlay" size="13"
> value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
> style="font-family: Times New Roman; font-size: 12pt"></font></td>
> Now, are you suggesting to use the value of l_IsChecked to be utilized in
> the input tag of the text boxes? Need a little clarification here. Regards
>
>
>
>
>
> "Curt_C [MVP]" wrote:
>
>> You will have to get the value of the checkbox when the page loads. I
>> would
>> use a simple string value to hold a " disabled " or " " text string. Then
>> in
>> ALL of your controls do a <input..... <%= YourValue %> ...>
>>
>>
>> --
>> Curt Christianson
>> Site & Scripts: http://www.Darkfalz.com
>> Blog: http://blog.Darkfalz.com
>>
>>
>> "Jack" <J***@discussions.microsoft.com> wrote in message
>> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
>> >I have a asp form where among others there are few text boxes and one
>> >check
>> > box. The checkbox is
>> > to indicate whether the entry is final. The checkbox is attahced to a
>> > field
>> > in table of type yes/no.
>> > After saving the documents,the form is refreshed. At this point, if the
>> > checkbox has been saved with checked,
>> > it shows unchecked, if it has been saved unchecked it shows unchecked.
>> >
>> > Here, if the checkbox shows checked, I want to disable (or lock) all
>> > the
>> > text boxes and the checkbox itself
>> > which will prevent further entry.
>> >
>> > Can this be done with asp? Any suggestion/help is highly appeciated.
>> > Previous postings did not help
>> > to get this resolved. Regards.
>>
>>
>>
Author
1 Mar 2005 8:21 PM
Curt_C [MVP]
obviously you need to clean up the code, what I wrote was only suggestion
quality :}

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


Show quote
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:e$F%23MtpHFHA.2924@TK2MSFTNGP15.phx.gbl...
> correct...
> <%
> if cbool(l_IsChecked)
>    isDisabled = " disabled "
> else
>    isDisabled = " "
>
> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......
>
>
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Jack" <J***@discussions.microsoft.com> wrote in message
> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
>> Thanks for your insight Curt, I appreciate it. Here is the code of the
>> checkbox:
>> <i><input type="checkbox"  name="chk_Complete" value="TRUE"
>> <%Response.Write
>> l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked" Else
>> Response.Write " unchecked"%>>
>>
>> while one of the textbox in the asp page is coded as:
>> <input type="text" name="txt_CurrentOutlay" size="13"
>> value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
>> style="font-family: Times New Roman; font-size: 12pt"></font></td>
>> Now, are you suggesting to use the value of l_IsChecked to be utilized in
>> the input tag of the text boxes? Need a little clarification here.
>> Regards
>>
>>
>>
>>
>>
>> "Curt_C [MVP]" wrote:
>>
>>> You will have to get the value of the checkbox when the page loads. I
>>> would
>>> use a simple string value to hold a " disabled " or " " text string.
>>> Then in
>>> ALL of your controls do a <input..... <%= YourValue %> ...>
>>>
>>>
>>> --
>>> Curt Christianson
>>> Site & Scripts: http://www.Darkfalz.com
>>> Blog: http://blog.Darkfalz.com
>>>
>>>
>>> "Jack" <J***@discussions.microsoft.com> wrote in message
>>> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
>>> >I have a asp form where among others there are few text boxes and one
>>> >check
>>> > box. The checkbox is
>>> > to indicate whether the entry is final. The checkbox is attahced to a
>>> > field
>>> > in table of type yes/no.
>>> > After saving the documents,the form is refreshed. At this point, if
>>> > the
>>> > checkbox has been saved with checked,
>>> > it shows unchecked, if it has been saved unchecked it shows unchecked.
>>> >
>>> > Here, if the checkbox shows checked, I want to disable (or lock) all
>>> > the
>>> > text boxes and the checkbox itself
>>> > which will prevent further entry.
>>> >
>>> > Can this be done with asp? Any suggestion/help is highly appeciated.
>>> > Previous postings did not help
>>> > to get this resolved. Regards.
>>>
>>>
>>>
>
>
Author
1 Mar 2005 8:49 PM
Jack
You just had wonderful advise, Curt. Thanks a ton. Instead of disabled, I had
to change the properties to readonly. With the texts and the checkbox being
disabled, the values are not been passed to the sql processing and database
saving asp page. However, with readonly attribute, this problem does not
arise.

Only one problem still exists. That is, with the checkbox, the readonly
property did not work. The disbled property cannot be applied due to the
reasons explained above. Do you have any idea, how to make the checkbox
'useless' i.e. users will not be able to click and uncheck the checkbox now.
I am yet to come up with an idea.
Any thoughts. Regards.

Show quote
"Curt_C [MVP]" wrote:

> correct...
> <%
> if cbool(l_IsChecked)
>     isDisabled = " disabled "
> else
>     isDisabled = " "
>
> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......
>
>
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Jack" <J***@discussions.microsoft.com> wrote in message
> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
> > Thanks for your insight Curt, I appreciate it. Here is the code of the
> > checkbox:
> > <i><input type="checkbox"  name="chk_Complete" value="TRUE"
> > <%Response.Write
> > l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked" Else
> > Response.Write " unchecked"%>>
> >
> > while one of the textbox in the asp page is coded as:
> > <input type="text" name="txt_CurrentOutlay" size="13"
> > value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
> > style="font-family: Times New Roman; font-size: 12pt"></font></td>
> > Now, are you suggesting to use the value of l_IsChecked to be utilized in
> > the input tag of the text boxes? Need a little clarification here. Regards
> >
> >
> >
> >
> >
> > "Curt_C [MVP]" wrote:
> >
> >> You will have to get the value of the checkbox when the page loads. I
> >> would
> >> use a simple string value to hold a " disabled " or " " text string. Then
> >> in
> >> ALL of your controls do a <input..... <%= YourValue %> ...>
> >>
> >>
> >> --
> >> Curt Christianson
> >> Site & Scripts: http://www.Darkfalz.com
> >> Blog: http://blog.Darkfalz.com
> >>
> >>
> >> "Jack" <J***@discussions.microsoft.com> wrote in message
> >> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
> >> >I have a asp form where among others there are few text boxes and one
> >> >check
> >> > box. The checkbox is
> >> > to indicate whether the entry is final. The checkbox is attahced to a
> >> > field
> >> > in table of type yes/no.
> >> > After saving the documents,the form is refreshed. At this point, if the
> >> > checkbox has been saved with checked,
> >> > it shows unchecked, if it has been saved unchecked it shows unchecked.
> >> >
> >> > Here, if the checkbox shows checked, I want to disable (or lock) all
> >> > the
> >> > text boxes and the checkbox itself
> >> > which will prevent further entry.
> >> >
> >> > Can this be done with asp? Any suggestion/help is highly appeciated.
> >> > Previous postings did not help
> >> > to get this resolved. Regards.
> >>
> >>
> >>
>
>
>
Author
1 Mar 2005 8:55 PM
Curt_C [MVP]
we had a similar issue with checkboxes. What we did to work around it was
add an onClick() so that if it was checked and someone clicked it, it
automatically, re-checked itself.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


Show quote
"Jack" <J***@discussions.microsoft.com> wrote in message
news:50696DA8-380E-4E06-A4C6-66DDEF224976@microsoft.com...
> You just had wonderful advise, Curt. Thanks a ton. Instead of disabled, I
> had
> to change the properties to readonly. With the texts and the checkbox
> being
> disabled, the values are not been passed to the sql processing and
> database
> saving asp page. However, with readonly attribute, this problem does not
> arise.
>
> Only one problem still exists. That is, with the checkbox, the readonly
> property did not work. The disbled property cannot be applied due to the
> reasons explained above. Do you have any idea, how to make the checkbox
> 'useless' i.e. users will not be able to click and uncheck the checkbox
> now.
> I am yet to come up with an idea.
> Any thoughts. Regards.
>
> "Curt_C [MVP]" wrote:
>
>> correct...
>> <%
>> if cbool(l_IsChecked)
>>     isDisabled = " disabled "
>> else
>>     isDisabled = " "
>>
>> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......
>>
>>
>> --
>> Curt Christianson
>> Site & Scripts: http://www.Darkfalz.com
>> Blog: http://blog.Darkfalz.com
>>
>>
>> "Jack" <J***@discussions.microsoft.com> wrote in message
>> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
>> > Thanks for your insight Curt, I appreciate it. Here is the code of the
>> > checkbox:
>> > <i><input type="checkbox"  name="chk_Complete" value="TRUE"
>> > <%Response.Write
>> > l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked"
>> > Else
>> > Response.Write " unchecked"%>>
>> >
>> > while one of the textbox in the asp page is coded as:
>> > <input type="text" name="txt_CurrentOutlay" size="13"
>> > value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
>> > style="font-family: Times New Roman; font-size: 12pt"></font></td>
>> > Now, are you suggesting to use the value of l_IsChecked to be utilized
>> > in
>> > the input tag of the text boxes? Need a little clarification here.
>> > Regards
>> >
>> >
>> >
>> >
>> >
>> > "Curt_C [MVP]" wrote:
>> >
>> >> You will have to get the value of the checkbox when the page loads. I
>> >> would
>> >> use a simple string value to hold a " disabled " or " " text string.
>> >> Then
>> >> in
>> >> ALL of your controls do a <input..... <%= YourValue %> ...>
>> >>
>> >>
>> >> --
>> >> Curt Christianson
>> >> Site & Scripts: http://www.Darkfalz.com
>> >> Blog: http://blog.Darkfalz.com
>> >>
>> >>
>> >> "Jack" <J***@discussions.microsoft.com> wrote in message
>> >> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
>> >> >I have a asp form where among others there are few text boxes and one
>> >> >check
>> >> > box. The checkbox is
>> >> > to indicate whether the entry is final. The checkbox is attahced to
>> >> > a
>> >> > field
>> >> > in table of type yes/no.
>> >> > After saving the documents,the form is refreshed. At this point, if
>> >> > the
>> >> > checkbox has been saved with checked,
>> >> > it shows unchecked, if it has been saved unchecked it shows
>> >> > unchecked.
>> >> >
>> >> > Here, if the checkbox shows checked, I want to disable (or lock) all
>> >> > the
>> >> > text boxes and the checkbox itself
>> >> > which will prevent further entry.
>> >> >
>> >> > Can this be done with asp? Any suggestion/help is highly appeciated.
>> >> > Previous postings did not help
>> >> > to get this resolved. Regards.
>> >>
>> >>
>> >>
>>
>>
>>
Author
1 Mar 2005 9:05 PM
Jack
I have no idea yet how to handle the onclick stuff. I am consulting the web
for some help. Could you shed some light with the code, if you recall.
Regards. Again, I appreciate all your generous help.

Show quote
"Curt_C [MVP]" wrote:

> we had a similar issue with checkboxes. What we did to work around it was
> add an onClick() so that if it was checked and someone clicked it, it
> automatically, re-checked itself.
>
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Jack" <J***@discussions.microsoft.com> wrote in message
> news:50696DA8-380E-4E06-A4C6-66DDEF224976@microsoft.com...
> > You just had wonderful advise, Curt. Thanks a ton. Instead of disabled, I
> > had
> > to change the properties to readonly. With the texts and the checkbox
> > being
> > disabled, the values are not been passed to the sql processing and
> > database
> > saving asp page. However, with readonly attribute, this problem does not
> > arise.
> >
> > Only one problem still exists. That is, with the checkbox, the readonly
> > property did not work. The disbled property cannot be applied due to the
> > reasons explained above. Do you have any idea, how to make the checkbox
> > 'useless' i.e. users will not be able to click and uncheck the checkbox
> > now.
> > I am yet to come up with an idea.
> > Any thoughts. Regards.
> >
> > "Curt_C [MVP]" wrote:
> >
> >> correct...
> >> <%
> >> if cbool(l_IsChecked)
> >>     isDisabled = " disabled "
> >> else
> >>     isDisabled = " "
> >>
> >> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......
> >>
> >>
> >> --
> >> Curt Christianson
> >> Site & Scripts: http://www.Darkfalz.com
> >> Blog: http://blog.Darkfalz.com
> >>
> >>
> >> "Jack" <J***@discussions.microsoft.com> wrote in message
> >> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
> >> > Thanks for your insight Curt, I appreciate it. Here is the code of the
> >> > checkbox:
> >> > <i><input type="checkbox"  name="chk_Complete" value="TRUE"
> >> > <%Response.Write
> >> > l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked"
> >> > Else
> >> > Response.Write " unchecked"%>>
> >> >
> >> > while one of the textbox in the asp page is coded as:
> >> > <input type="text" name="txt_CurrentOutlay" size="13"
> >> > value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
> >> > style="font-family: Times New Roman; font-size: 12pt"></font></td>
> >> > Now, are you suggesting to use the value of l_IsChecked to be utilized
> >> > in
> >> > the input tag of the text boxes? Need a little clarification here.
> >> > Regards
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > "Curt_C [MVP]" wrote:
> >> >
> >> >> You will have to get the value of the checkbox when the page loads. I
> >> >> would
> >> >> use a simple string value to hold a " disabled " or " " text string.
> >> >> Then
> >> >> in
> >> >> ALL of your controls do a <input..... <%= YourValue %> ...>
> >> >>
> >> >>
> >> >> --
> >> >> Curt Christianson
> >> >> Site & Scripts: http://www.Darkfalz.com
> >> >> Blog: http://blog.Darkfalz.com
> >> >>
> >> >>
> >> >> "Jack" <J***@discussions.microsoft.com> wrote in message
> >> >> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
> >> >> >I have a asp form where among others there are few text boxes and one
> >> >> >check
> >> >> > box. The checkbox is
> >> >> > to indicate whether the entry is final. The checkbox is attahced to
> >> >> > a
> >> >> > field
> >> >> > in table of type yes/no.
> >> >> > After saving the documents,the form is refreshed. At this point, if
> >> >> > the
> >> >> > checkbox has been saved with checked,
> >> >> > it shows unchecked, if it has been saved unchecked it shows
> >> >> > unchecked.
> >> >> >
> >> >> > Here, if the checkbox shows checked, I want to disable (or lock) all
> >> >> > the
> >> >> > text boxes and the checkbox itself
> >> >> > which will prevent further entry.
> >> >> >
> >> >> > Can this be done with asp? Any suggestion/help is highly appeciated.
> >> >> > Previous postings did not help
> >> >> > to get this resolved. Regards.
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
Author
1 Mar 2005 9:25 PM
Mike D
I wish I remember where this came from but put this in the head of the page
<SCRIPT LANGUAGE="JavaScript" >
    function dont_touch(form) {
        if (form.checked) {
        form.checked = false
            } else {
        form.checked = true
    }
}
</SCRIPT>

Then put this inside the checkbox tags onClick='dont_touch(this)'

It's javascript not asp but sounds like what you want.

Mike



Show quote
"Jack" wrote:

> I have no idea yet how to handle the onclick stuff. I am consulting the web
> for some help. Could you shed some light with the code, if you recall.
> Regards. Again, I appreciate all your generous help.
>
> "Curt_C [MVP]" wrote:
>
> > we had a similar issue with checkboxes. What we did to work around it was
> > add an onClick() so that if it was checked and someone clicked it, it
> > automatically, re-checked itself.
> >
> > --
> > Curt Christianson
> > Site & Scripts: http://www.Darkfalz.com
> > Blog: http://blog.Darkfalz.com
> >
> >
> > "Jack" <J***@discussions.microsoft.com> wrote in message
> > news:50696DA8-380E-4E06-A4C6-66DDEF224976@microsoft.com...
> > > You just had wonderful advise, Curt. Thanks a ton. Instead of disabled, I
> > > had
> > > to change the properties to readonly. With the texts and the checkbox
> > > being
> > > disabled, the values are not been passed to the sql processing and
> > > database
> > > saving asp page. However, with readonly attribute, this problem does not
> > > arise.
> > >
> > > Only one problem still exists. That is, with the checkbox, the readonly
> > > property did not work. The disbled property cannot be applied due to the
> > > reasons explained above. Do you have any idea, how to make the checkbox
> > > 'useless' i.e. users will not be able to click and uncheck the checkbox
> > > now.
> > > I am yet to come up with an idea.
> > > Any thoughts. Regards.
> > >
> > > "Curt_C [MVP]" wrote:
> > >
> > >> correct...
> > >> <%
> > >> if cbool(l_IsChecked)
> > >>     isDisabled = " disabled "
> > >> else
> > >>     isDisabled = " "
> > >>
> > >> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......
> > >>
> > >>
> > >> --
> > >> Curt Christianson
> > >> Site & Scripts: http://www.Darkfalz.com
> > >> Blog: http://blog.Darkfalz.com
> > >>
> > >>
> > >> "Jack" <J***@discussions.microsoft.com> wrote in message
> > >> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
> > >> > Thanks for your insight Curt, I appreciate it. Here is the code of the
> > >> > checkbox:
> > >> > <i><input type="checkbox"  name="chk_Complete" value="TRUE"
> > >> > <%Response.Write
> > >> > l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked"
> > >> > Else
> > >> > Response.Write " unchecked"%>>
> > >> >
> > >> > while one of the textbox in the asp page is coded as:
> > >> > <input type="text" name="txt_CurrentOutlay" size="13"
> > >> > value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
> > >> > style="font-family: Times New Roman; font-size: 12pt"></font></td>
> > >> > Now, are you suggesting to use the value of l_IsChecked to be utilized
> > >> > in
> > >> > the input tag of the text boxes? Need a little clarification here.
> > >> > Regards
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > "Curt_C [MVP]" wrote:
> > >> >
> > >> >> You will have to get the value of the checkbox when the page loads. I
> > >> >> would
> > >> >> use a simple string value to hold a " disabled " or " " text string.
> > >> >> Then
> > >> >> in
> > >> >> ALL of your controls do a <input..... <%= YourValue %> ...>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> Curt Christianson
> > >> >> Site & Scripts: http://www.Darkfalz.com
> > >> >> Blog: http://blog.Darkfalz.com
> > >> >>
> > >> >>
> > >> >> "Jack" <J***@discussions.microsoft.com> wrote in message
> > >> >> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
> > >> >> >I have a asp form where among others there are few text boxes and one
> > >> >> >check
> > >> >> > box. The checkbox is
> > >> >> > to indicate whether the entry is final. The checkbox is attahced to
> > >> >> > a
> > >> >> > field
> > >> >> > in table of type yes/no.
> > >> >> > After saving the documents,the form is refreshed. At this point, if
> > >> >> > the
> > >> >> > checkbox has been saved with checked,
> > >> >> > it shows unchecked, if it has been saved unchecked it shows
> > >> >> > unchecked.
> > >> >> >
> > >> >> > Here, if the checkbox shows checked, I want to disable (or lock) all
> > >> >> > the
> > >> >> > text boxes and the checkbox itself
> > >> >> > which will prevent further entry.
> > >> >> >
> > >> >> > Can this be done with asp? Any suggestion/help is highly appeciated.
> > >> >> > Previous postings did not help
> > >> >> > to get this resolved. Regards.
> > >> >>
> > >> >>
> > >> >>
> > >>
> > >>
> > >>
> >
> >
> >
Author
1 Mar 2005 10:22 PM
Adrienne
Gazing into my crystal ball I observed =?Utf-8?B?TWlrZSBE?=
<Mi***@discussions.microsoft.com> writing in
Show quote
news:CD66C688-2E7B-4DB4-B48D-F6D609BB7229@microsoft.com:

> I wish I remember where this came from but put this in the head of the
> page
><SCRIPT LANGUAGE="JavaScript" >
>     function dont_touch(form) {
>         if (form.checked) {
>         form.checked = false
>             } else {
>         form.checked = true
>     }
> }
></SCRIPT>
>
> Then put this inside the checkbox tags onClick='dont_touch(this)'
>
> It's javascript not asp but sounds like what you want.
>
> Mike
>

And with that, unless you know for certain that javascript is available on
the client, you need to validate server side.
Show quote
>
>
> "Jack" wrote:
>
>> I have no idea yet how to handle the onclick stuff. I am consulting
>> the web for some help. Could you shed some light with the code, if you
>> recall. Regards. Again, I appreciate all your generous help.
>>
>> "Curt_C [MVP]" wrote:
>>
>> > we had a similar issue with checkboxes. What we did to work around
>> > it was add an onClick() so that if it was checked and someone
>> > clicked it, it automatically, re-checked itself.
>> >
>> > --
>> > Curt Christianson
>> > Site & Scripts: http://www.Darkfalz.com
>> > Blog: http://blog.Darkfalz.com
>> >
>> >
>> > "Jack" <J***@discussions.microsoft.com> wrote in message
>> > news:50696DA8-380E-4E06-A4C6-66DDEF224976@microsoft.com...
>> > > You just had wonderful advise, Curt. Thanks a ton. Instead of
>> > > disabled, I had to change the properties to readonly. With the
>> > > texts and the checkbox being disabled, the values are not been
>> > > passed to the sql processing and database saving asp page.
>> > > However, with readonly attribute, this problem does not arise.
>> > >
>> > > Only one problem still exists. That is, with the checkbox, the
>> > > readonly property did not work. The disbled property cannot be
>> > > applied due to the reasons explained above. Do you have any idea,
>> > > how to make the checkbox 'useless' i.e. users will not be able to
>> > > click and uncheck the checkbox now. I am yet to come up with an
>> > > idea. Any thoughts. Regards.
>> > >
>> > > "Curt_C [MVP]" wrote:
>> > >
>> > >> correct...
>> > >> <%
>> > >> if cbool(l_IsChecked)
>> > >>     isDisabled = " disabled " else
>> > >>     isDisabled = " "
>> > >>
>> > >> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %>
>> > >> ......
>> > >>
>> > >>
>> > >> --
>> > >> Curt Christianson
>> > >> Site & Scripts: http://www.Darkfalz.com
>> > >> Blog: http://blog.Darkfalz.com
>> > >>
>> > >>
>> > >> "Jack" <J***@discussions.microsoft.com> wrote in message
>> > >> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
>> > >> > Thanks for your insight Curt, I appreciate it. Here is the code
>> > >> > of the checkbox: <i><input type="checkbox"  name="chk_Complete"
>> > >> > value="TRUE" <%Response.Write l_IsChecked%><%if
>> > >> > cbool(l_IsChecked) then Response.Write " checked" Else
>> > >> > Response.Write " unchecked"%>>
>> > >> >
>> > >> > while one of the textbox in the asp page is coded as:
>> > >> > <input type="text" name="txt_CurrentOutlay" size="13"
>> > >> > value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
>> > >> > style="font-family: Times New Roman; font-size:
>> > >> > 12pt"></font></td> Now, are you suggesting to use the value of
>> > >> > l_IsChecked to be utilized in the input tag of the text boxes?
>> > >> > Need a little clarification here. Regards
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> >
>> > >> > "Curt_C [MVP]" wrote:
>> > >> >
>> > >> >> You will have to get the value of the checkbox when the page
>> > >> >> loads. I would use a simple string value to hold a " disabled
>> > >> >> " or " " text string. Then
>> > >> >> in
>> > >> >> ALL of your controls do a <input..... <%= YourValue %> ...>
>> > >> >>
>> > >> >>
>> > >> >> --
>> > >> >> Curt Christianson
>> > >> >> Site & Scripts: http://www.Darkfalz.com
>> > >> >> Blog: http://blog.Darkfalz.com
>> > >> >>
>> > >> >>
>> > >> >> "Jack" <J***@discussions.microsoft.com> wrote in message
>> > >> >> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
>> > >> >> >I have a asp form where among others there are few text boxes
>> > >> >> >and one check
>> > >> >> > box. The checkbox is
>> > >> >> > to indicate whether the entry is final. The checkbox is
>> > >> >> > attahced to a field in table of type yes/no.
>> > >> >> > After saving the documents,the form is refreshed. At this
>> > >> >> > point, if the checkbox has been saved with checked, it shows
>> > >> >> > unchecked, if it has been saved unchecked it shows
>> > >> >> > unchecked.
>> > >> >> >
>> > >> >> > Here, if the checkbox shows checked, I want to disable (or
>> > >> >> > lock) all the text boxes and the checkbox itself
>> > >> >> > which will prevent further entry.
>> > >> >> >
>> > >> >> > Can this be done with asp? Any suggestion/help is highly
>> > >> >> > appeciated. Previous postings did not help to get this
>> > >> >> > resolved. Regards.
>> > >> >>
>> > >> >>
>> > >> >>
>> > >>
>> > >>
>> > >>
>> >
>> >
>> >
>



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Author
1 Mar 2005 10:41 PM
Jack
Thanks to Mike and Adrienne for the respective advise. Mike, your code
just works fine. Though my intention was to use asp to find this solution,
I could not come up with one. Not sure it can be done so. Anyhow, the
Javascript solved the lingering issue.  Thanks again. Regards.

Show quote
"Mike D" wrote:

> I wish I remember where this came from but put this in the head of the page
> <SCRIPT LANGUAGE="JavaScript" >
>     function dont_touch(form) {
>         if (form.checked) {
>         form.checked = false
>             } else {
>         form.checked = true
>     }
> }
> </SCRIPT>
>
> Then put this inside the checkbox tags onClick='dont_touch(this)'
>
> It's javascript not asp but sounds like what you want.
>
> Mike
>
>
>
> "Jack" wrote:
>
> > I have no idea yet how to handle the onclick stuff. I am consulting the web
> > for some help. Could you shed some light with the code, if you recall.
> > Regards. Again, I appreciate all your generous help.
> >
> > "Curt_C [MVP]" wrote:
> >
> > > we had a similar issue with checkboxes. What we did to work around it was
> > > add an onClick() so that if it was checked and someone clicked it, it
> > > automatically, re-checked itself.
> > >
> > > --
> > > Curt Christianson
> > > Site & Scripts: http://www.Darkfalz.com
> > > Blog: http://blog.Darkfalz.com
> > >
> > >
> > > "Jack" <J***@discussions.microsoft.com> wrote in message
> > > news:50696DA8-380E-4E06-A4C6-66DDEF224976@microsoft.com...
> > > > You just had wonderful advise, Curt. Thanks a ton. Instead of disabled, I
> > > > had
> > > > to change the properties to readonly. With the texts and the checkbox
> > > > being
> > > > disabled, the values are not been passed to the sql processing and
> > > > database
> > > > saving asp page. However, with readonly attribute, this problem does not
> > > > arise.
> > > >
> > > > Only one problem still exists. That is, with the checkbox, the readonly
> > > > property did not work. The disbled property cannot be applied due to the
> > > > reasons explained above. Do you have any idea, how to make the checkbox
> > > > 'useless' i.e. users will not be able to click and uncheck the checkbox
> > > > now.
> > > > I am yet to come up with an idea.
> > > > Any thoughts. Regards.
> > > >
> > > > "Curt_C [MVP]" wrote:
> > > >
> > > >> correct...
> > > >> <%
> > > >> if cbool(l_IsChecked)
> > > >>     isDisabled = " disabled "
> > > >> else
> > > >>     isDisabled = " "
> > > >>
> > > >> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......
> > > >>
> > > >>
> > > >> --
> > > >> Curt Christianson
> > > >> Site & Scripts: http://www.Darkfalz.com
> > > >> Blog: http://blog.Darkfalz.com
> > > >>
> > > >>
> > > >> "Jack" <J***@discussions.microsoft.com> wrote in message
> > > >> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
> > > >> > Thanks for your insight Curt, I appreciate it. Here is the code of the
> > > >> > checkbox:
> > > >> > <i><input type="checkbox"  name="chk_Complete" value="TRUE"
> > > >> > <%Response.Write
> > > >> > l_IsChecked%><%if cbool(l_IsChecked) then Response.Write " checked"
> > > >> > Else
> > > >> > Response.Write " unchecked"%>>
> > > >> >
> > > >> > while one of the textbox in the asp page is coded as:
> > > >> > <input type="text" name="txt_CurrentOutlay" size="13"
> > > >> > value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
> > > >> > style="font-family: Times New Roman; font-size: 12pt"></font></td>
> > > >> > Now, are you suggesting to use the value of l_IsChecked to be utilized
> > > >> > in
> > > >> > the input tag of the text boxes? Need a little clarification here.
> > > >> > Regards
> > > >> >
> > > >> >
> > > >> >
> > > >> >
> > > >> >
> > > >> > "Curt_C [MVP]" wrote:
> > > >> >
> > > >> >> You will have to get the value of the checkbox when the page loads. I
> > > >> >> would
> > > >> >> use a simple string value to hold a " disabled " or " " text string.
> > > >> >> Then
> > > >> >> in
> > > >> >> ALL of your controls do a <input..... <%= YourValue %> ...>
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> Curt Christianson
> > > >> >> Site & Scripts: http://www.Darkfalz.com
> > > >> >> Blog: http://blog.Darkfalz.com
> > > >> >>
> > > >> >>
> > > >> >> "Jack" <J***@discussions.microsoft.com> wrote in message
> > > >> >> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
> > > >> >> >I have a asp form where among others there are few text boxes and one
> > > >> >> >check
> > > >> >> > box. The checkbox is
> > > >> >> > to indicate whether the entry is final. The checkbox is attahced to
> > > >> >> > a
> > > >> >> > field
> > > >> >> > in table of type yes/no.
> > > >> >> > After saving the documents,the form is refreshed. At this point, if
> > > >> >> > the
> > > >> >> > checkbox has been saved with checked,
> > > >> >> > it shows unchecked, if it has been saved unchecked it shows
> > > >> >> > unchecked.
> > > >> >> >
> > > >> >> > Here, if the checkbox shows checked, I want to disable (or lock) all
> > > >> >> > the
> > > >> >> > text boxes and the checkbox itself
> > > >> >> > which will prevent further entry.
> > > >> >> >
> > > >> >> > Can this be done with asp? Any suggestion/help is highly appeciated.
> > > >> >> > Previous postings did not help
> > > >> >> > to get this resolved. Regards.
> > > >> >>
> > > >> >>
> > > >> >>
> > > >>
> > > >>
> > > >>
> > >
> > >
> > >
Author
1 Mar 2005 9:12 PM
Adrienne
Gazing into my crystal ball I observed "=?Utf-8?B?SmFjaw==?="
<J***@discussions.microsoft.com> writing in
Show quote
news:50696DA8-380E-4E06-A4C6-66DDEF224976@microsoft.com:

> You just had wonderful advise, Curt. Thanks a ton. Instead of disabled,
> I had to change the properties to readonly. With the texts and the
> checkbox being disabled, the values are not been passed to the sql
> processing and database saving asp page. However, with readonly
> attribute, this problem does not arise.
>
> Only one problem still exists. That is, with the checkbox, the readonly
> property did not work. The disbled property cannot be applied due to
> the reasons explained above. Do you have any idea, how to make the
> checkbox 'useless' i.e. users will not be able to click and uncheck the
> checkbox now. I am yet to come up with an idea.
> Any thoughts. Regards.

If I were you, I would pass the value in a hidden input, and maybe just
show plain text to let the user know they checked (or did not check)
before.  Or you could use the disabled attribute and some CSS to make it
not look disabled (not sure on that one, check with a CSS group to see if
that's possible).


Show quote
>
> "Curt_C [MVP]" wrote:
>
>> correct...
>> <%
>> if cbool(l_IsChecked)
>>     isDisabled = " disabled " else
>>     isDisabled = " "
>>
>> <input type="text" name="txt_CurrentOutlay" <%= isDisabled %> ......
>>
>>
>> --
>> Curt Christianson
>> Site & Scripts: http://www.Darkfalz.com
>> Blog: http://blog.Darkfalz.com
>>
>>
>> "Jack" <J***@discussions.microsoft.com> wrote in message
>> news:0666B351-322C-4914-95D2-90412A0354DB@microsoft.com...
>> > Thanks for your insight Curt, I appreciate it. Here is the code of
>> > the checkbox: <i><input type="checkbox"  name="chk_Complete"
>> > value="TRUE" <%Response.Write l_IsChecked%><%if cbool(l_IsChecked)
>> > then Response.Write " checked" Else Response.Write " unchecked"%>>
>> >
>> > while one of the textbox in the asp page is coded as:
>> > <input type="text" name="txt_CurrentOutlay" size="13"
>> > value="<%Response.Write FormatCurrency(l_cu_CurrentOutlay,2)%>"
>> > style="font-family: Times New Roman; font-size: 12pt"></font></td>
>> > Now, are you suggesting to use the value of l_IsChecked to be
>> > utilized in the input tag of the text boxes? Need a little
>> > clarification here. Regards
>> >
>> >
>> >
>> >
>> >
>> > "Curt_C [MVP]" wrote:
>> >
>> >> You will have to get the value of the checkbox when the page loads.
>> >> I would use a simple string value to hold a " disabled " or " "
>> >> text string. Then  in ALL of your controls do a <input..... <%=
>> >> YourValue %> ...>
>> >>
>> >>
>> >> --
>> >> Curt Christianson
>> >> Site & Scripts: http://www.Darkfalz.com
>> >> Blog: http://blog.Darkfalz.com
>> >>
>> >>
>> >> "Jack" <J***@discussions.microsoft.com> wrote in message
>> >> news:246BCFBD-9696-48A5-91C6-CD713E3B3129@microsoft.com...
>> >> >I have a asp form where among others there are few text boxes and
>> >> >one check
>> >> > box. The checkbox is
>> >> > to indicate whether the entry is final. The checkbox is attahced
>> >> > to a field in table of type yes/no.
>> >> > After saving the documents,the form is refreshed. At this point,
>> >> > if the checkbox has been saved with checked, it shows unchecked,
>> >> > if it has been saved unchecked it shows unchecked.
>> >> >
>> >> > Here, if the checkbox shows checked, I want to disable (or lock)
>> >> > all the text boxes and the checkbox itself
>> >> > which will prevent further entry.
>> >> >
>> >> > Can this be done with asp? Any suggestion/help is highly
>> >> > appeciated. Previous postings did not help to get this resolved.
>> >> > Regards.
>> >>
>> >>
>> >>
>>
>>
>>
>



--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

AddThis Social Bookmark Button