Perhaps you need to place a Choise box (<select> element) on your webpage, where a Bangladeshi can choose his/her district.
You’ll be happy, I’ve coded it. Enjoy
The code is pretty self explanatory, view live or download from here. If you have questions, or can’t understand how to use it, you’re always welcome to ask me by commenting.
Well, sometimes we need to use ID Attributes of some HTML Elements of a web page. But, if any element lacks ID attribute, we’ll face trouble. So here is a script to automatically set IDs to all of your text <input type = “text”> tags and <textarea> Elements 😉
First we’ll check if the element already has an ID attribute [i.e <input type = “text” id = “myId”>]
If it does has an ID, we will not change it. Else, we will set an ID dynamically to the content.
What we actually do?
- Loop through all input elements
- Check if it is a text field. If yes, we check if it already have an ID
- If yes, continue. Else, dynamically set an iD
Here goes the code snippet, enjoy 🙂
Howdy! Today I’m going to share a free birthdate picker for your website. Just call the function birthdate_populate, pass the IDs of Date, Month and Year’s <SELECT> tags, and you are done!
Code in action
View the live Demo here!
How to use
Now in your <body> section, at first put Three <select> tags to pick the date. Give them appropritae name and ID
Choose your Birthday:
<SELECT id ="date" name = "dd"></SELECT>
<SELECT id ="month" name = "mm"></SELECT>
<SELECT id ="year" name = "yyyy"></SELECT>
Now is the main part. put this code just somewhere below your <select> tags:
That’s it! You’re Done!
Download Source Code
Visit the official site here to download