Still not resolved. Need expert help

Discussion in 'ASP General' started by Jack, Mar 1, 2005.

  1. Jack

    Jack Guest

    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.
    Jack, Mar 1, 2005
    #1
    1. Advertising

  2. Jack

    Jack Guest

    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" <> wrote in message
    > news:...
    > >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.

    >
    >
    >
    Jack, Mar 1, 2005
    #2
    1. Advertising

  3. Jack

    Jack Guest

    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" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > >> news:...
    > >> >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.
    > >>
    > >>
    > >>

    >
    >
    >
    Jack, Mar 1, 2005
    #3
  4. Jack

    Jack Guest

    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" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > >> news:...
    > >> > 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" <> wrote in message
    > >> >> news:...
    > >> >> >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.
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >
    Jack, Mar 1, 2005
    #4
  5. Jack

    Adrienne Guest

    Gazing into my crystal ball I observed "=?Utf-8?B?SmFjaw==?="
    <> writing in
    news::

    > 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" <> wrote in message
    >> news:...
    >> > 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" <> wrote in message
    >> >> news:...
    >> >> >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
    Adrienne, Mar 1, 2005
    #5
  6. Jack

    Mike D Guest

    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" <> wrote in message
    > > news:...
    > > > 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" <> wrote in message
    > > >> news:...
    > > >> > 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" <> wrote in message
    > > >> >> news:...
    > > >> >> >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.
    > > >> >>
    > > >> >>
    > > >> >>
    > > >>
    > > >>
    > > >>

    > >
    > >
    > >
    Mike D, Mar 1, 2005
    #6
  7. Jack

    Adrienne Guest

    Gazing into my crystal ball I observed =?Utf-8?B?TWlrZSBE?=
    <> writing in
    news::

    > 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" <> wrote in message
    >> > news:...
    >> > > 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" <> wrote in message
    >> > >> news:...
    >> > >> > 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" <> wrote in message
    >> > >> >> news:...
    >> > >> >> >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
    Adrienne, Mar 1, 2005
    #7
  8. Jack

    Jack Guest

    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" <> wrote in message
    > > > news:...
    > > > > 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" <> wrote in message
    > > > >> news:...
    > > > >> > 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" <> wrote in message
    > > > >> >> news:...
    > > > >> >> >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.
    > > > >> >>
    > > > >> >>
    > > > >> >>
    > > > >>
    > > > >>
    > > > >>
    > > >
    > > >
    > > >
    Jack, Mar 1, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YW5kcmV3IFdpZWQ=?=
    Replies:
    1
    Views:
    366
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Apr 27, 2004
  2. =?Utf-8?B?Um95?=

    Please help - Remot name could not br resolved

    =?Utf-8?B?Um95?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    559
    =?Utf-8?B?Um95?=
    Jan 20, 2006
  3. shapper
    Replies:
    7
    Views:
    300
    shapper
    Feb 27, 2007
  4. need expert help

    , Feb 23, 2005, in forum: C Programming
    Replies:
    0
    Views:
    343
  5. DGS
    Replies:
    2
    Views:
    93
Loading...

Share This Page