Ask a Question related to ASP, Design and Development.
-
wildt #1
checkbox
I know there is a way to update records with a checkbox.
Is there a way to update this records (with different value)by
unchecking the checkbox?
wildt Guest
-
Howto bind CheckBox to the datagrid/ Then update the database field when the checkbox is clicked.
I am trying to update the database field when the checkbox is clicked. I am trying to modified the following solution but.. got stuck on the... -
asp checkbox
Kerri, Do a search for the checkbox list object and how to databind it. It think that's what will work best for you. Sincerely, -- S.... -
Q: How to get the value of a checkbox of which name without '[]'?
Consider the following form in a HTML file: .... <input type=checkbox name="box" value=1> <input type=checkbox name="box" value=2> <input... -
[PHP] Q: How to get the value of a checkbox of which name without '[]'?
> Consider the following form in a HTML file: -
DIV, CheckBox
Hello, I am populating a DIV with Checkboxes based on rows I get from a Table while dr.read() ..... mydiv.controls.add(etc...) .... other set... -
tom wilfred #2
Re: checkbox
I have the submit selected chechbox working.
SQL = "UPDATE emp SET attended='Active' WHERE ID
IN("&request.form("toadd")&")"
I'm trying to use uncheck to update the attended field
when the checkbox is unchecked.
if it was previously selected the checkbox is checked.
This is what i have to uncheck and it's not doing anything
If Request.form("toadd") = "" then
SQL = "UPDATE CourseReg SET attended='' WHERE ID
IN("&request.form("toadd")&")"
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
tom wilfred Guest
-
Paul #3
checkbox
I know this is gonna sound silly but when I submit a form with a checkbox
html control "mychk", how can I see if that is checked or not ?
I have tried :
if request.form("mychk") = true then
' code
else
' code
end if
But it always executes the code in the else statement meaning it is never
true despite the fact I have given the checkbox a value of true.
Paul Guest
-
MDB #4
Re: checkbox
Try if request.form("mychk") = "true" then
The checkbox is a string not a boolean value.
"Paul" <paul@themedialounge.com> wrote in message
news:%23FK6fURTDHA.2148@TK2MSFTNGP11.phx.gbl...> I know this is gonna sound silly but when I submit a form with a checkbox
> html control "mychk", how can I see if that is checked or not ?
>
> I have tried :
>
> if request.form("mychk") = true then
> ' code
> else
> ' code
> end if
>
> But it always executes the code in the else statement meaning it is never
> true despite the fact I have given the checkbox a value of true.
>
>
>
>
MDB Guest
-
torm #5
checkbox
i have only 1 checkbox.. if user not check that box then he/she can not go to
the next field
my coding
<TD><INPUT name="Agree" type="checkbox" value="YES" <cfif Agree is
"YES">checked</cfif>> Yes, I accepted it </Td>
<cfif Agree is unchecked {
window .alert(" Please check an agrreement box");
return false;
}
it does not work .... Please help
torm Guest
-
Kronin555 #6
Re: checkbox
I'm assuming that you have a form, with a checkbox on it, and if they don't
check the checkbox, they either can't submit the form or can't enter data in
fields below the checkbox.
What you're wanting is a client-side process. Coldfusion is server-side,
meaning that the user's browser doesn't see any coldfusion code, all the
coldfusion commands are already processed by the time the response gets back to
the user.
Javascript is one client-side technology that will work in this instance. If
you want to prevent them from submitting a form unless they check the box,
you'll need something like:
<script language="javascript">
function checkAgreement() {
if(!document.myform.Agree.checked) {
window.alert("Please check an agreement box");
return false;
}
return true;
}
</script>
<form name="myform" method="post" action="processForm.cfm" onSubmit="return
checkAgreement();">
<input type="checkbox" name="Agree" value="Yes"> Yes, I accepted it<br>
<input type="submit" value="Submit" name="Submit">
</form>
Kronin555 Guest
-
torm #7
Re: checkbox
Hi
i am lucky to see you again ... hihhihii good fridat huh..????? thanks alot i
t works ... and i feel y i am stupid..
i think i need to learn more javascript... i worked witrh window before.. i
did not take any
HTML or JAVASCRIPT ... I learn HTML by myself and got trainning 1 class
coldfusion ... Could you tell me where
i can get more information a about JAVASCRIPT....??? can iT stand alone
...??? or it just works like
function.. thanks SO MUCH adn very very much.
torm Guest
-
Kronin555 #8
Re: checkbox
I like the O'Reilly books. Here's one on Javascript:
[url]http://www.amazon.com/exec/obidos/tg/detail/-/0596000480/qid=1117551971/sr=8-1/ref=pd_csp_1/104-4188798-1333552?v=glance&s=books&n=507846[/url]
Kronin555 Guest
-
reg #9
checkbox
hi , i´m new in the world of vb.net. I´m using sql server, vb.net
language: my problem is : i have a table "Test" with "Text and Sure"
as row. "Sure" is a bit value. how do i insert "Sure" in the database
with the insert command in vb.net?
Here is the insert command
objSQL ="Insert into Aufträge (AuftragsDatum, Name, Vorname,
StrassePostfach, PLZ, Ort, Telefon," & _
"Bearbeiter, Garantie, ExterneNummer, RechnungsDatum, Auftraggeber,
Tätigkeit, Arbeitsfeld1, Arbeitsfeld2, Arbeitsfeld3," & _
"Angebot, Auftrag, BVName, BVStrasse, BVPLZ, BVOrt, Auftragsumme,
Schlussrechnung, Text) Values (@AuftragsDatum, @Name, @Vorname,
@StrassePostfach, " & _
"@PLZ, @Ort, @Telefon, @Bearbeiter, @Garantie, @ExterneNummer,
@RechnungsDatum, @Auftraggeber, @Tätigkeit, @Arbeitsfeld1, " & _
"@Arbeitsfeld2, @Arbeitsfeld3, @Angebot, @Auftrag, @BVName, @BVStrasse,
@BVPLZ, @BVOrt, @Auftragsumme, @Schlussrechnung, @Text)"
Dim objConn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("S toeve"))
Dim objCmd as New SQLCommand(objSQL, objConn)
objCmd.Parameters.Add(New SQLParameter("@AuftragsDatum",
"txtAuftragsDatum.Text"))
objCmd.Parameters.Add(New SQLParameter("@Name",
"txtName.Text"))
objCmd.Parameters.Add(New SQLParameter("@Vorname",
"txtVorname.Text"))
objCmd.Parameters.Add(New SQLParameter("@StrassePostfach",
"txtStrassePostfach.Text"))
objCmd.Parameters.Add(New SQLParameter("@PLZ", "txtPLZ.Text"))
objCmd.Parameters.Add(New SQLParameter("@Ort", "txtOrt.Text"))
objCmd.Parameters.Add(New SQLParameter("@Telefon",
"txtTelefon.Text"))
objCmd.Parameters.Add(New SQLParameter("@Bearbeiter",
ddlMA.SelectedItem.Value))
objCmd.Parameters.Add(New SQLParameter("@Garantie",
SqlDbType.Bit,1
"Garantie"))
SqlParameter paramGarantie = New SQLParameter("@Garantie",
SqlDbType.Bit,1,"Garantie")
paramGarantie.Value=CBG.Checked
objCmd.Parameters.Add(paramGarantie)
objCmd.Parameters.Add(New SQLParameter("@ExterneNummer",
"txtExterneNummer.Text"))
objCmd.Parameters.Add(New SQLParameter("@RechnungsDatum",
SqlDbType.DateTime,8, "RechnungsDatum"))
objCmd.Parameters.Add(New SQLParameter("@Auftraggeber",
ddlAG.SelectedItem.Value))
objCmd.Parameters.Add(New SQLParameter("@Tätigkeit",
ddlT.SelectedItem.Value))
objCmd.Parameters.Add(New SQLParameter("@Arbeitsfeld1",
ddlA1.SelectedItem.Value))
objCmd.Parameters.Add(New SQLParameter("@Arbeitsfeld2",
ddlA2.SelectedItem.Value))
objCmd.Parameters.Add(New SQLParameter("@Arbeitsfeld3",
ddlA3.SelectedItem.Value))
objCmd.Parameters.Add(New SQLParameter("@Angebot",
SqlDbType.Bit,1,
"Angebot"))
objCmd.Parameters.Add(New SQLParameter("@Auftrag",
SqlDbType.Bit,1,
"Auftrag"))
objCmd.Parameters.Add(New SQLParameter("@BVName",
"txtBVName.Text"))
objCmd.Parameters.Add(New SQLParameter("@BVStrasse",
"txtBVStrasse.Text"))
objCmd.Parameters.Add(New SQLParameter("@BVPLZ",
"txtBVPLZ.Text"))
objCmd.Parameters.Add(New SQLParameter("@BVOrt","
txtBVOrt.Text"))
objCmd.Parameters.Add(New SQLParameter("@Auftragsumme",
SqlDbType.Money,8, "Auftragsumme"))
objCmd.Parameters.Add(New SQLParameter("@Schlussrechnung",
SqlDbType.Money,8, "Schlussrechnung"))
objCmd.Parameters.Add(New SQLParameter("@Text",
"txtText.Text"))
objConn.Open()
objCmd.ExecuteNonQuery()
label1.visible="true"
BindData()
objConn.Close()
label1.text = "Die Datei wurde gespeichert!"
'Response.Redirect("insertAuftrag.aspx")
End Sub
Thanks
reg Guest



Reply With Quote

