|
| |
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
Sending checkbox to another page - 1/22/2006 9:04:22
Hi, I would like to send a some checkboxs to another page I have some data and it works fine but what should I write in the request.form (the other page) while not rs2.EOF
%>
<TR>
<TD><INPUT type="checkbox" id=" " name=<%=rs2("Software")%>></TD>
<TD><%=rs2("Software")%></TD>
</TR>
<%
rs2.MoveNext
wend thanks, Elen
|
|
|
|
BeTheBall
Posts: 6354 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Sending checkbox to another page - 1/22/2006 11:05:35
Checkboxes are a little different than other form fields in that nothing is sent unless the box is checked. You must assign a value attribute to the checkbox and whatever that value is, is what will go to the next page, database, etc. Here are a couple of examples. Suppose you are selling t-shirts and you have several checkboxes for the color, a box named red, a box named blue and a box named green. The value of each checkbox is True. If the user checks each box, then you have three form field values of true that are sent to the next step. The other example is almost the same except instead of the boxes being named, red, blue and green, they are all named color and instead of the values being True, the value of one is red, another blue and the last green. If again the user checks all three boxes, what is sent to the next page is a comma-delimited string that looks like this: red,blue,green I suspect this may not directly answer your question, but may give you some insight into how checkboxes behave and help you do what you need. If not, feel free to clarify your needs.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 1/22/2006 16:02:39
I see what you mean.But I can't give the fields a certien name because I don't know how many fields I have.... I was thinking of your second example, but in your example, how do I read the variables in my other page? Do your have any other suggestion for me how do send some variable to another page?
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 1/23/2006 6:51:33
Thanks,what I get at the other page is "on,on,on,on......" ,But I do I know which one of the "on" belong to Windows? Linux? (in your example)
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 1/23/2006 16:36:33
The Values are 2 columns 1 is the ID and the second is the software name like Windows,Office,linux etc.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 1/24/2006 12:52:25
Can Someone help me please. Can Someone send me an example of code that use "checkbox", I need to transfer the checkboxes that I marked to another page I don't have any idea how to do it......
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 1/25/2006 1:20:44
Thanks, But how should I create the second page (the page I am recieving the data)? something like: rs=request.form(.........???
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 1/26/2006 7:10:51
SomeOne......
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 1/29/2006 2:40:50
The result is the word "software". My problem is , how do I recive the data from the first page? for example, when I am sending a textbox, I give it a name (something like Firstname) and at the second page I am writing Name=request.form("Firstname"), So what Shild I write at the second page for the Checkbox?
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 2/8/2006 1:35:22
AnyOne??????????????
|
|
|
|
jeepless
Posts: 213 Joined: 12/20/2003 From: Smack in the middle of USA Status: offline
|
RE: Sending checkbox to another page - 2/8/2006 10:11:10
quote:
We need to confirm what is happening on that second page What happens when you do : <%=response.write("software")%> In Spooky's reply three steps up, shouldn't the correct code be: <%=response.write(software)%> --ie, with quotes removed? With the quotes, you're telling ASP to write the word "software" and that's exactly what it did but that wasn't the intention. I think he meant for the ASP code to write the value of the variable "software" to see what's being passed to the second page. Try the corrected code in your second page, then post back what was sent.
_____________________________
The problem with designing a system that's foolproof is that designers underestimate complete fools.
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Sending checkbox to another page - 2/9/2006 8:35:37
OK, And then what? if I would like to print all the results for this software I should I do it?I can't use loop or something like that
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|