home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1773
Discussions: 188,401, Posts: 2,243,601, Members: 232,629
Old August 24th, 2004, 09:01 PM   Digg it!   #1 (permalink)
Ultimate Member
 
Tekk's Avatar
 
Join Date: Oct 2001
Location: Pasadena, CA
Posts: 2,152
Getting different items with same name in URL rewriting

Couldn't think of a decent and short enough title for this post so sorry about the ugly Title!!

In any case, I've got a webpage for a client that pulls PO data out of a table and lists the info on a page. Each line of the output has a checkbox next to it. I want the user to be able to check either one or multiple checkboxes and then click the submit button and go to a page that lists ONLY those checked PO items.

My problem is Ive hitten a mental block on how to properly handle the mutliple checkboxes. What I've done so far is in the loop that prints all the PO items to the browser, I have the checkbox tag like so:

<input type="checkbox" name="poitem" value="<%= rspo("Purno") %>" />

When I click submit (using the get method of the form for easier testing) I am able to properly see the item(s) i have checked in the URL. The way I have it setup obviously is that each checkbox has the same name. So for instance, the Url would look like this:

http://www.somesite.com/default.asp?...m=12&poitem=13

When I response.write(request("poitem")) it gives me:

11, 12, 13

Like a collection. But what is the darn code so that I can access each one specifically? This is ASP btw.
__________________
YAH! I knew you'd be jealous

Tekk is offline   Reply With Quote
Old August 25th, 2004, 08:04 PM     #2 (permalink)
Ultimate Member
 
Tekk's Avatar
 
Join Date: Oct 2001
Location: Pasadena, CA
Posts: 2,152
Well in the interest of giving some future person the answer, here's what I found that is quite simple!

All you need to do is use the split( String ,delimmeter ) command and it will automatically take away the comma and space and place the values into an array.

So going off the above example of 11, 12, 13 I would do this:

arrayNum = split(Request("poitem"), ", ")

This creates the array! Then you just iterate through it like you would any other collection and you're good to go!

Tekk is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse 50,000+ items at Amazon sorted by price & percentage off beyimako ResellerRatings Homepage Deals 0 April 4th, 2004 03:52 PM
To XP Warez users: Microsoft will find JOO! goldenbuddha General Tech Discussion 132 January 20th, 2004 12:35 PM
Easter Eggs JayMan Applications and Operating Systems 3 June 10th, 2003 12:27 AM

Most Active Discussions
Is It Just Me? (2906)
Unarmed man on his stomach shot by .. (6)
Misery Loves Company... (2144)
New Build ( Finally ) (6)
CPU wont boot (7)
Building a gaming computer advice (5)
I think I just killed my computer w.. (24)
Folderchat Weekday thread (444)
Upgrading RAM (6)
Recent Discussions
How do you move a hard-drive to.. (4)
Laptop proccesor to desktop mob.. (1)
What is the best external enclo.. (0)
Partition Magic 7.0 (Unallocate.. (17)
For cheap price and good qualit.. (1)
Left 4 Dead Small Freezes (3)
RCA 52Inch HDTV wont turn on (4)
wishin i could edit my aol prof.. (0)
Sporadic internet connectivity (2)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 03:42 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28