Solved

select drop down menu and populate two text boxes

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
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 look for a specific file type in a local or remote server directory using PHP.

706 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

17 Experts available now in Live!

Get 1:1 Help Now