Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

select drop down menu and populate two text boxes

Posted on 2006-11-07
3
Medium Priority
?
266 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
1 Comment
 
LVL 7

Accepted Solution

by:
mpn_1983 earned 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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…
Suggested Courses

824 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