473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Still not resolved. Need expert help

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.
Jul 22 '05 #1
11 1527
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" <Ja**@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.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.

Jul 22 '05 #2
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" <Ja**@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.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.


Jul 22 '05 #3
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" <Ja**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.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.


Jul 22 '05 #4
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
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:e$****************@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" <Ja**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.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.


Jul 22 '05 #5
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" <Ja**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
news:24**********************************@microsof t.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.


Jul 22 '05 #6
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" <Ja**@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
>> news:24**********************************@microsof t.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.
>>
>>
>>


Jul 22 '05 #7
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" <Ja**@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
>> news:24**********************************@microsof t.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.
>>
>>
>>


Jul 22 '05 #8
Gazing into my crystal ball I observed "=?Utf-8?B?SmFjaw==?="
<Ja**@discussions.microsoft.com> writing in
news:50**********************************@microsof t.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).


"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" <Ja**@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
>> news:24**********************************@microsof t.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
Jul 22 '05 #9
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" <Ja**@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
> news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
> >> news:24**********************************@microsof t.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.
> >>
> >>
> >>
>
>
>


Jul 22 '05 #10
Gazing into my crystal ball I observed =?Utf-8?B?TWlrZSBE?=
<Mi***@discussions.microsoft.com> writing in
news:CD**********************************@microsof t.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.

"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" <Ja**@discussions.microsoft.com> wrote in message
> news:50**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
> >> news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
> >> >> news:24**********************************@microsof t.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
Jul 22 '05 #11
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.

"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" <Ja**@discussions.microsoft.com> wrote in message
news:50**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
>> news:06**********************************@microsof t.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" <Ja**@discussions.microsoft.com> wrote in message
>> >> news:24**********************************@microsof t.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.
>> >>
>> >>
>> >>
>>
>>
>>

Jul 22 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Efy. | last post by:
Hello, The following problam description I did not need to write, I just copied from the groups from others which met the error and allways the thread was 1 artical the problem was never...
2
by: Uma Abhyankar | last post by:
Hello, I am using .NET Beta1 Visual Studio. I have to invoke VCBuild through MSBuild on command prompt. I have following issues: Issue1: -------- MSBuild invokes VCBuild internally....
1
by: Uma Abhyankar | last post by:
Hello All, I was facing an issue with VCBuild on Beta1. Today after shifting to .NET Beta2, it looks like the issue is still not resolved :-( I have to invoke VCBuild through MSBuild on command...
14
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left...
14
by: Craig O'Shannessy | last post by:
Hi all, Just thought I'd mention that I really think this problem needs to be fixed. I I'm patching the 7.4RC1 JDBC drivers as we speak due to this optimiser bug, and it's the third time...
0
by: Damon | last post by:
I've been pulling my hair out over this and I need some expert help. I'm trying to access an XML API using cURL over SSL. Here's the API address: ...
3
by: Chris | last post by:
I have a python script that is driving Excel and using the win32com module. However, upon program completion there's still an Excel.exe process running in the background that I must terminate...
3
by: amanjsingh | last post by:
Hi, I am trying to implement Java Web Service using Apache Axis2 and Eclipse as a tool. I have created the basic code and deployed the service using various eclipse plugin but when I try to invoke...
9
by: lorlarz | last post by:
I still have a question regarding the following code, in a commonly used routine. First, Here's the code in question: Function.prototype.bind = function(){ var fn = this, args =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.