Solved

select drop down menu and populate two text boxes

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
calculated column 12 74
Select from sql by results from textbox 8 26
Sql query on a varchar that is numeric. 8 24
PHP - AJAX and MySQL it works only if the value is a number 12 33
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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 …

932 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

13 Experts available now in Live!

Get 1:1 Help Now