Solved

select drop down menu and populate two text boxes

Posted on 2006-11-07
3
254 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

792 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