If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

send value to DB for checkbox that is off

This is server side. This is part of a credit application that submits to
SQL Server. I am trying to display a graphic of a red checkmark on the confirmation
page where the field is the same as the checkbox checked on the app. I can
do that easily by setting the value of the checkbox to value="checkmark".
I then Response.Write that into the <IMG src="./<% bla bla bla %>.gif"> What
I'm having trouble with is displaying a clear.gif in the fields on the confirmation
that weren't checked. I need to display something to keep the text from shifting
around. If the clear.gif is the same size as the checkmark.gif. How can I
set a value for a checkbox that isn't checked.

"Colm" <colm_gallagher@hotmail.com> wrote:
>
>Kyle,
>
>Do you want to do this on the client side - unless you propose submitting
>the page each time the check is clicked (slow) what you are trying to do
>is not possible (because it's using server side code).
>
>Investige changing images on the client side using javascript by doing a
>search on www.javascript.com or look through the tips on www.chami.com/tips
>
>Unless your question was just quickly typed, it looks like there is a little
>area of greyness in your "clientside or serverside" thinking. If this is
>the case, check out this excellent article on msdn:
>http://support.microsoft.com/support.../Q301/0/97.ASP
>
>It's a little bit easy what they do here, but the links at the bottom lead
>off to a goldmine of ASP resources.
>
>--
>Colm Gallagher
>www.coralquest.com
>
>
>"Kyle" <rkfinch@generationinformed.com> wrote:
>>
>>If Request("Individual") = on Then
>>checkmark = "checkmark.gif"
>>Else
>>checkmark = "nocheckmark.gif"
>>End If
>>If Request("Joint") = on Then
>>checkmark = "checkmark.gif"
>>Else
>>checkmark = "nocheckmark.gif"
>>End If
>>
>>I'm trying to display a different graphic for whatever checkbox is checked.
>>Individual <% Response.Write Request(checkmark) %>
>>Joint <% Response.Write Request(checkmark) %>

Re: send value to DB for checkbox that is off

Two ways:

1. Put an <img> tag containing the transparent gif somewhere on the page.
Write a client-side page onload script that cycles through the checkboxes
and either inserts (dynamic) or sets the src property (existing) for the
<img> tag for that checkbox based on the checked value.

2. On the server, keep a list of all the checkboxes. When the user submits
the page, write the img tag for the transparent gif for every checkbox that
was not sent with the form data (the ones the user didn't check).

However, it sounds like the easiest method might be to either use absolute
positioning for the confirmation display, or to put the confirmation display
text in a table, where you can force the alignment.

"Kyle" <rkfinch@generationinformed.com> wrote in message
news:3bb88f50@news.devx.com...
>
> This is server side. This is part of a credit application that submits to
> SQL Server. I am trying to display a graphic of a red checkmark on the
confirmation
> page where the field is the same as the checkbox checked on the app. I can
> do that easily by setting the value of the checkbox to value="checkmark".
> I then Response.Write that into the <IMG src="./<% bla bla bla %>.gif">
What
> I'm having trouble with is displaying a clear.gif in the fields on the
confirmation
> that weren't checked. I need to display something to keep the text from
shifting
> around. If the clear.gif is the same size as the checkmark.gif. How can I
> set a value for a checkbox that isn't checked.
>
> "Colm" <colm_gallagher@hotmail.com> wrote:
> >
> >Kyle,
> >
> >Do you want to do this on the client side - unless you propose submitting
> >the page each time the check is clicked (slow) what you are trying to do
> >is not possible (because it's using server side code).
> >
> >Investige changing images on the client side using javascript by doing a
> >search on www.javascript.com or look through the tips onwww.chami.com/tips
> >
> >Unless your question was just quickly typed, it looks like there is a
little
> >area of greyness in your "clientside or serverside" thinking. If this is
> >the case, check out this excellent article on msdn:
> >http://support.microsoft.com/support.../Q301/0/97.ASP
> >
> >It's a little bit easy what they do here, but the links at the bottom
lead
> >off to a goldmine of ASP resources.
> >
> >--
> >Colm Gallagher
> >www.coralquest.com
> >
> >
> >"Kyle" <rkfinch@generationinformed.com> wrote:
> >>
> >>If Request("Individual") = on Then
> >>checkmark = "checkmark.gif"
> >>Else
> >>checkmark = "nocheckmark.gif"
> >>End If
> >>If Request("Joint") = on Then
> >>checkmark = "checkmark.gif"
> >>Else
> >>checkmark = "nocheckmark.gif"
> >>End If
> >>
> >>I'm trying to display a different graphic for whatever checkbox is
checked.
> >>Individual <% Response.Write Request(checkmark) %>
> >>Joint <% Response.Write Request(checkmark) %>
>