Solved

select drop down menu and populate two text boxes

Posted on 2006-11-07
3
253 Views
Last Modified: 2010-05-18
I'm writing a booking room system for a school.
I have x2 textboxes time_start and time_finish.

I have a drop-down box which says (Period 1, Period 2, etc...)

I want to pick a period from the drop-down box, I.e: Period 1 (08:40-09:40) and then to have it populate the two textboxes with time_start (08:40) and time_finish (09:40).

Many Thanks
0
Comment
Question by:matthewsampson
3 Comments
 
LVL 7

Accepted Solution

by:
mpn_1983 earned 250 total points
ID: 17907568
To do this you'll need to use javascript or have the form submitted after the user selects from the drop down box.

The javascript would put all options into an array and then use the onchange="" parameter of the drop down box to call a function which would populate the text boxes.

The other option would require the user to click on submit each time they select a new period.

Of the two the javascript would be the generally more user friendly but may carry accessiblity issues.

If you're interested in the javascript solution just ask and i can post a skeletal concept of if.

Matt
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now