https://github.com/cvyl/fr-department-lookup
Lookup French department names by their 2- or 3-digit codes with this simple web app.
https://github.com/cvyl/fr-department-lookup
department departments france javascript lookup
Last synced: 7 months ago
JSON representation
Lookup French department names by their 2- or 3-digit codes with this simple web app.
- Host: GitHub
- URL: https://github.com/cvyl/fr-department-lookup
- Owner: cvyl
- License: mit
- Created: 2023-11-07T21:06:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-10T23:30:44.000Z (almost 2 years ago)
- Last Synced: 2025-02-03T14:43:20.594Z (9 months ago)
- Topics: department, departments, france, javascript, lookup
- Language: JavaScript
- Homepage: https://cvyl.me/fr-department-lookup/
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# French Department Code Lookup Web App
This is a simple web application that allows you to look up French department names by their respective 2- to 3-digit codes. It uses jQuery for frontend interaction and JavaScript to perform the department code lookup.
## How to Use
### Click [here](https://dev.lgbt.sh/fr-department-lookup) for an online demo!1. Clone or download this repository to your local machine.
2. Open the `index.html` file in your web browser.
3. Enter a 2- or 3-digit department code in the input field.
4. Click the "Verify" button.
5. The department name corresponding to the code will be displayed below the button, or an error message will appear if the code is invalid.
## Features
- Validates the input to ensure it's a 2- to 3-digit code.
- Retrieves department data from a JSON file (`departements.json`).
- Displays the department name if a valid code is entered.## Project Structure
- `index.html`: The main HTML file that contains the input field, button, and result display area.
- `Script1.js`: The JavaScript file that handles user interactions and department code lookup.
- `departements.json`: A JSON file containing the mapping of department codes to department names.## Contributing
Feel free to contribute to this project by making modifications, adding features, or fixing bugs. You can fork the repository and submit pull requests.
## About This Project
I created this web app for a friend approximately eight months ago to provide a practical tool. However, sometime later, our relationship broke up, but the project remains here as a useful resource.
## License
This project is open-source and available under the [MIT License](LICENSE). You can find the full license details by clicking on the link.