473,382 Members | 1,705 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,382 software developers and data experts.

checkbox - Querystring

I have an asp page populated by a sql database. I am using stored procs
with Dreamweaver. I know very little Javascript but think that it will help
me in this case.

I am using a repeating table to show all records that meet a certain
criteria from SQL. I have placed a checkbox next to each record. I have
enclosed the repeating table in a form. I want the user to be able to check
one or more of the checkboxes and then click the submit button on the form.

I want the form to submit to another pahe that runs a SQL command to update
the database. In order to do this I need a specific field (entry) to be
passed as a querystring to the update page. I have set the name of the
repeating checkbox to the corresponding "entry" value of each record.

I hope I am explaining this the right way. Any help would be appreciated.
Thanks!

Darren
Jul 23 '05 #1
5 3143
"Darren" <da****@lan-specialist.com> skrev i meddelandet
news:Tg*******************@nwrdny02.gnilink.net...
I have an asp page populated by a sql database. I am using stored procs
with Dreamweaver. I know very little Javascript but think that it will help me in this case.

I am using a repeating table to show all records that meet a certain
criteria from SQL. I have placed a checkbox next to each record. I have
enclosed the repeating table in a form. I want the user to be able to check one or more of the checkboxes and then click the submit button on the form.
I want the form to submit to another pahe that runs a SQL command to update the database. In order to do this I need a specific field (entry) to be
passed as a querystring to the update page. I have set the name of the
repeating checkbox to the corresponding "entry" value of each record.

I hope I am explaining this the right way. Any help would be appreciated.
Thanks!

Darren


If a unique id/primary key or something like that becomes the name of the
checkbox, make sure the name is legal HTML for form element names. For
instance, the name can't start with a digit.

Or what exactly is your question?

Joakim Braun
Jul 23 '05 #2
How do I use a checkbox to send a value through a Querystring to another
page?

Basically I am trying to delete records from a table by selecting the
checkboxes and then clicking delete. I can get it to work checking one
checkbox but not with multiple.

"Joakim Braun" <jo**********@jfbraun.removethis.com> wrote in message
news:zT*****************@nntpserver.swip.net...
"Darren" <da****@lan-specialist.com> skrev i meddelandet
news:Tg*******************@nwrdny02.gnilink.net...
I have an asp page populated by a sql database. I am using stored procs
with Dreamweaver. I know very little Javascript but think that it will

help
me in this case.

I am using a repeating table to show all records that meet a certain
criteria from SQL. I have placed a checkbox next to each record. I have enclosed the repeating table in a form. I want the user to be able to

check
one or more of the checkboxes and then click the submit button on the

form.

I want the form to submit to another pahe that runs a SQL command to

update
the database. In order to do this I need a specific field (entry) to be
passed as a querystring to the update page. I have set the name of the
repeating checkbox to the corresponding "entry" value of each record.

I hope I am explaining this the right way. Any help would be appreciated. Thanks!

Darren


If a unique id/primary key or something like that becomes the name of the
checkbox, make sure the name is legal HTML for form element names. For
instance, the name can't start with a digit.

Or what exactly is your question?

Joakim Braun

Jul 23 '05 #3
In article <eU******************@nwrdny03.gnilink.net>, darren@lan-
specialist.com enlightened us with...
How do I use a checkbox to send a value through a Querystring to another
page?

Basically I am trying to delete records from a table by selecting the
checkboxes and then clicking delete. I can get it to work checking one
checkbox but not with multiple.


This should be done server-side with ASP, not with client-side
javascript. Are you using JScript? If not, ask this question in an ASP
group that uses VBScript.

And you should NOT be using the querystring to delete records. Too easy
for the user to mess up when refreshing the page and whatnot. Always use
POST for things that affect the DB. GET is for queries.

Verify that your question pertains to server-side JScript and elaborate
and I might be able to help you.

--
--
~kaeli~
When two egotists meet, it's an I for an I.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4
"Darren" <da****@lan-specialist.com> skrev i meddelandet
news:eU******************@nwrdny03.gnilink.net...
How do I use a checkbox to send a value through a Querystring to another
page?

Basically I am trying to delete records from a table by selecting the
checkboxes and then clicking delete. I can get it to work checking one
checkbox but not with multiple.


If the checkboxes are all in the same form, all you should have to do is
submit it with GET (or POST) to some server-side script that walks the
possible range of checkbox names, or figures out what to delete in some
other appropriate way.

Say you have a form like this:

<form method="get" action="thing.htm" name="someform">
<input type="checkbox" name="uniqueid1" value="1">
<input type="checkbox" name="uniqueid2" value="1">
<input type="submit" name="Submit" value="Submit">
</form>

Check the checkboxes, submit and the resulting URL looks like this:
http://...someplace.../thing.htm?uni...&Submit=Submit

Unchecked or unnamed checkboxes are not submitted. Whatever server-side
technology you use will have some convenient way to retrieve those GET
request variables. Of course, the query string is equally accessible with
client-side javascript.

Joakim Braun
Jul 23 '05 #5
Forgot to add: To try out your form, you'll need to connect through http.
You won't get any query string if you go through "local file viewing
mechanisms" (on IE in Windows XP at least).

Joakim Braun
Jul 23 '05 #6

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

Similar topics

1
by: Eric | last post by:
Hi all, I have a form that generates a dynamic number of rows from a value passed in via querystring. I have a one static row in my form with a "master" checkbox that I have deemed "Select...
3
by: MarkVan | last post by:
I am pretty new to ASP. HTML Page <input type="checkbox" name="chkStat" value="" checked>Low ASP Page chkCheck = request.form("chkStat") response.write chkCheck I get nothing? How do I...
1
by: nicholas | last post by:
I am using Obout TreeView: www.obout.com I would like to implement a page to add and remove categories to a product with the Obout Treeview with checkboxes. Does anyone allready did this and...
0
by: Beppe | last post by:
Hi all! I have a .aspx page with 3 hyperlink and 1 checkbox. The NavigateUrl hyperlinks' property retreive dinamically its value (they reload the same page with different params and querystrings);...
5
by: FP | last post by:
I have a list of results. When the user clicks a checkbox I need it to update the database but I don't want it to reload the current page. Currently I have the following; - a checkbox in a form...
4
by: Mike Haberfellner | last post by:
....hi everyone, ....i posted this allready, but my newsreader doesn't display it to me - so i'm sorry if it's posted twice... hi again, sorry for not clearly writing what i really need :) ...
0
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
11
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, I have a large recordset to be displayed on a ASP 3.0 page. I am using recordset paging for this. For the next and previous link i am passing href as <a href=<Page URl>?page=<%=...
9
by: magix | last post by:
If I have <form action="process.asp" method="get" name="form1"> .... .... <input TYPE=checkbox name=sports VALUE=Cricket> <input TYPE=checkbox name=sports VALUE=Swimming> <input...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.