Skip to content

cvyl/fr-department-lookup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 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. You can find the full license details by clicking on the link.

About

Lookup French department names by their 2- or 3-digit codes with this simple web app.

Topics

Resources

License

Stars

Watchers

Forks