| | |
Feeding a value in a dropdown list to another dropdown list
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
hihi,
can someone help me with this problem;
i want to be able to feed a value from a dropdown list A as a condition for items in dropdown list B. both dropdown list are in the same form. the values for both dropdown list are extracted from my mysql database.
i've tried to refreshing the page with javascript with this
function update(theForm){
location.href = location + "?Category=" + theForm.CategoryName.value }
this works fine if i only click once on dropdown list A but the if i happen to click again from dropdown list A, then the link would be something like "http://localhost/product.php?Category=food?Category=drink"
how to i replace the category argument value?
thanks in advance
can someone help me with this problem;
i want to be able to feed a value from a dropdown list A as a condition for items in dropdown list B. both dropdown list are in the same form. the values for both dropdown list are extracted from my mysql database.
i've tried to refreshing the page with javascript with this
function update(theForm){
location.href = location + "?Category=" + theForm.CategoryName.value }
this works fine if i only click once on dropdown list A but the if i happen to click again from dropdown list A, then the link would be something like "http://localhost/product.php?Category=food?Category=drink"
how to i replace the category argument value?
thanks in advance
![]() |
Similar Threads
- How to check element of list are present in other list? (Python)
- forcing set list in parameter list prompts? (C#)
- Replacing list items with other list (Python)
- radio button list in data list (ASP.NET)
- Dropdown list Last value (ASP.NET)
- DropDown List (VB.NET)
Other Threads in the PHP Forum
- Previous Thread: Set up manually, php 5.0 with apache's compatible version
- Next Thread: ftp help
| Thread Tools | Search this Thread |
.htaccess apache api array autocomplete beginner binary body broken cakephp class cms code convert cron curl database dataentry date date/time display duplicates dynamic ebooks email emptydisplayvalue error execute explodefunction file firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include ip javasciptvalidation javascript joomla keywords limit link login mail matching mediawiki menu methods multiple mycodeisbad mysql network number object oop paypal pdf php phpincludeissue query random recursive redirect remote script search securephp server sessions shot source sp space speed sql subdomain subscription system table tag tutorial tutorials upload url validator variable vbulletin video web white youtube





