473,662 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using Select tag to populate dynamic list - but how to make those list items links?

2 New Member
I'm using the select tag to populate a dynamic list of work categories from our database. I accomplished this just fine but how do I now make those list items link to the corresponding pages?

ie. Click on Accounting and populate a page with only those members in the accounting field.

Expand|Select|Wrap|Line Numbers
  1. <div id="Categories"><select name="list" size="105">
  2.     <?php
  3. do {  
  4. ?>
  5.     <option value="<?php echo $row_RS_Categories['ID']?>"<?php if (!(strcmp($row_RS_Categories['ID'], urlencode($row_RS_Categories['Categories'])))) {echo "selected=\"selected\"";} ?>><?php echo $row_RS_Categories['Categories']?></option>
  6.     <?php
  7. } while ($row_RS_Categories = mysql_fetch_assoc($RS_Categories));
  8.   $rows = mysql_num_rows($RS_Categories);
  9.   if($rows > 0) {
  10.       mysql_data_seek($RS_Categories, 0);
  11.       $row_RS_Categories = mysql_fetch_assoc($RS_Categories);
  12.   }
  13. ?>
  14.   </select>
  15.   </div>
Oct 11 '11 #1
5 2024
Dormilich
8,658 Recognized Expert Moderator Expert
not at all (at least not with HTML only). for that to work you have two options
- submit the form and within PHP redirect to the appropriate page
- use JavaScript to change the action attribute of the form so that the submit takes you to the desired destination
Oct 12 '11 #2
Jody Bowers
2 New Member
it's not in a form, just a div/select box that pulls up the list of categories. I want to format it so when you click on one of the categories it takes you to a page populated with only the members with that field selected.
Oct 12 '11 #3
Dormilich
8,658 Recognized Expert Moderator Expert
it's not in a form
if it’s a <select>, it has to be inside a <form>, otherwise your HTML is invalid.

if you insist on not using forms, try a CSS Dropdown Menu (e.g. the Suckerfish Dropdown)
Oct 13 '11 #4
freefony
59 New Member
i suggest AJAX i ve used it several times for stuffs like that gives u double advantage loads faster and works for u
Oct 13 '11 #5
Dormilich
8,658 Recognized Expert Moderator Expert
I doubt that for this case.
Oct 13 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

33
2995
by: Steven Bethard | last post by:
I feel like this has probably been answered before, but I couldn't find something quite like it in the archives. Feel free to point me somewhere if you know where this has already been answered. I have a list in a particular order that I want to split into two lists: the list of every nth item, and the list of remaining items. It's important to maintain the original order in both lists. So the first list is simple:
1
2135
by: Sakharam Phapale | last post by:
Hi All, How to show dropdown list of menu items just like click on Parent menu. For example, Edit (Parent menu) Cut (child menu) Copy (child menu) Paste (child menu)
2
2344
by: Sakharam Phapale | last post by:
Hi All, How to show dropdown list of menu items just like click on Parent menu. For example, Edit (Parent menu) Cut (child menu) Copy (child menu) Paste (child menu)
7
2451
by: David | last post by:
Hello All, I am trying to split a long list of list items ( li ) into 3 groups and append them to a div on the page. Below is the test page that I have created. It's fairly simple but I can't seem to get my head wrapped around it. Anyone here can offer a boost? http://mysite.verizon.net/microweb2/3collist.html David J.
1
1905
by: visualbasicide | last post by:
I have two lists, one above the other, and they are BOTH populated using vbscript and sql queries. what I want to happen is when they select something in the top list (departments) it refreshes the selections available in the bottom list (individuals) so in this case, if they select "IT" then the bottom list will update itself to show only: "me"
6
1804
by: Henrik Goldman | last post by:
Hello, I have a dataset which consist of a string username and string hostname as a key and then an integer representing a count as the matching "second" value in a pair. So far I've used std::list to store this information by inserting objects containing all 3 pieces of information. However now some users has datasets in the range of 12000 records and my list seems to be taking like forever to complete inserting and finding.
3
2411
by: Riccardo Murri | last post by:
Hello, I have some code that stops when trying to find a graph in a list of similar graphs:: (Pydb) list 110 try: 111 canonical = self.base 112 except ValueError: 113 raise ValueError, \
3
1924
by: bpw22az | last post by:
I am currently in the process of setting up an asp page that sends an inquiring student an email regarding his/her application status. The student enters his/her email address on a web page, the address is associated with the correspponding record in a sql database table, and an email is generated and sent to them based on app status. I am focusing on the "Incomplete" portion which will list all null fields from the table in the email. Using...
2
1484
by: ahmedyk | last post by:
Dear Sir, I have a field in database which stores multiple records, each record is separated by "," and when I populate a drop down list with these records , it displays all records in one line. How can I display each record in 1 line, and the next record in second line and so on?
5
1780
by: r3bol | last post by:
Hi, sorry to post this, but I've had a really hard time finding how to do it. Q. How can I break up a value in a list to a list of individual items (preferably without importing any modules)? Like... (string) to
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8344
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.