| | |
Confused!! how to automatically populate a field
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
Okay what I've got is a form and an array with a list of courses. The array populates a drop down list, I also have on the form a cost text box. What I would like is when the user chooses a course the cost field to automatically bring the price that matches the course (without clicking on any buttons). I am trying to do this in classic ASP and cannot use Javascript.
Can someone please help me....thanks
Can someone please help me....thanks
"It is far better to live like a Tiger for a day than to live like a jackal for a hundred years"
•
•
•
•
Okay what I've got is a form and an array with a list of courses. The array populates a drop down list, I also have on the form a cost text box. What I would like is when the user chooses a course the cost field to automatically bring the price that matches the course (without clicking on any buttons). I am trying to do this in classic ASP and cannot use Javascript.
Can someone please help me....thanks
post the form back to the same page with value from the list
and get the value corresponding to the list value using sql query....
i am working on the code...
Originally posted by aashishn86
populate the list....
post the form back to the same page with value from the list
and get the value corresponding to the list value using sql query....
i am working on the code...
The only thing is I have not stored courses in a database they are in an array.
"It is far better to live like a Tiger for a day than to live like a jackal for a hundred years"
Hi akhtarr, if you have physically entered the courses to an array, then create a multi-dimenion array which means you just add the value of the course into the array as you would normally do only now you are adding another value to it.
i.e.
You can retrieve these values in the same fashion as you would to populate the drop down box (select statement).
i.e.
ASP Syntax (Toggle Plain Text)
dim arrayName() ' only necessary if drawn from database redim arrayName(course_number) ' add the values arrayName(0) = course_name1 & "," & course_price1 arrayName(1) = course_name2 & "," & course_price2
You can retrieve these values in the same fashion as you would to populate the drop down box (select statement).
Regards,
TomBCullen
TomBCullen
![]() |
Other Threads in the ASP Forum
- Previous Thread: combo box error validation
- Next Thread: drop down lists which displays a text box when a selection is made
Views: 1543 | Replies: 7
| Thread Tools | Search this Thread |
Tag cloud for ASP
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile query record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit update web webserver windows7





