Member Avatar for Member #716813

I'm relatively new to Web Programming.I'm interning in an IT Department and I need to change the current archives web page which is currently set up as follows:

Client#-Project# CD#1 CD#2 CD#3....

It has thousands of clients and projects and each CD# is a link to the folder on the server that contains the folders for that project. I need to create a page or manipulate the current page so that when someone clicks on a CD#, there's a list of CD#'s pertaining only to that project. Any help would be greatly appreciated.

Dani AI

Generated

A compact, low-risk approach that fits the clarification from (clicking a Project# should show its CD entries) and the question from about where the mapping comes from: treat the text file as the data source, transform it into a structured mapping, expose that mapping via a simple API, and fetch CD lists on demand in the UI. This keeps the main page light and avoids embedding thousands of links in the DOM.

  • Parse and normalize the text file into a structure keyed by Project ID. Trim whitespace, dedupe entries, and validate that listed folders exist on the server during processing.
  • Persist the mapping in a small, queryable store (SQLite, simple JSON cache, or a tiny DB). Rebuild only when the source file changes.
  • Add a server endpoint like /api/project/{id}/cds that returns JSON for that project. Validate input, enforce authorization, and never build file paths from unvalidated input (avoid path traversal).
  • In the front end, use event delegation so clicks on Project rows trigger an AJAX fetch of the CD list. Render the returned list inline and provide a server-rendered fallback page for non-JS clients.
  • For links to folders, do not rely on file:// links served from an HTTP page. Expose the archive via the web server (virtual directory or handler) or provide download/preview endpoints so browser access is reliable and controllable.

Example of a minimal JSON response format:

{
  "projectId": "ClientA-Project123",
  "cds": [
    { "name": "CD1", "url": "/archives/ClientA/Project123/CD1/" },
    { "name": "CD2", "url": "/archives/ClientA/Project123/CD2/" }
  ]
}

Take care with permissions (NTLM/Windows auth on intranet if needed), caching for performance, and logging any mismatches between the text file and actual folders. This yields a fast, maintainable UI without exposing raw filesystem links or reloading huge pages.

Recommended Answers

All 3 Replies

Member Avatar for Member #905211

How do you know which CD#'s pertain to other CD#'s, where is this information comming from?

Member Avatar for Member #716813

Sorry, I meant when someone clicks on the Project# (not a CD#), it should show a list of the CD#'s that the project is in.

Member Avatar for Member #716813

All of the file path's to the CD's will be in a text file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.