iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Programming Programmers can seek advice or just show off their creations inside this forum.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-18-2009, 09:02 AM
WebProWorld New Member
 
Join Date: Jun 2009
Posts: 2
romalagajini RepRank 0
Default stocked in making double dynamic dependent select lis in php

hello guys;
I have read and watched and tried 2 million times to create the same thing that is in the tutorials in "Dynamic populating the drop down list based on the selected value of first list" but when I want to change it to my own website and convert it the way that works with my website I get stocked and it doesn't work!
I have 2 tables in mysql database; one is """car_names""" which contains the brand of the cars like: BENZ, BMW, NISSAN, HONDA, ...... and this table has 4 rows as below: :
1=> id
2=> menu_name
3=> position
4=> visible
the second table is """car_models""" which contains the type of the cars related to the first table like: 220E, 330E, civic, accord, sunny, .... and this table has 5 rows as below:
1=> id
2=> carname_id
3=> menu_name
4=> position
5=> visible
As I have created my web page in php I have 2 dropdown select lists that if you choose any car from the first list it works perfectly and brings me all the car's names from the first table from the database>>> menu_name's row. BUT if I choose for example HONDA from the first list the second list still remains empty. I have tried to change the code the I have downloaded from Dynamic populating the drop down list based on the selected value of first list and replace it with mine in or exchange some parts with my code but it didn't work!
I will really appreciate your helps and comments.
Please help me to get this code work for my website, it has been a headache for me about 2 months already!
I don't know how to upload the files here in this website but if you need I can send you the mypage with mysql database files for you.
Reply With Quote
  #2 (permalink)  
Old 06-21-2009, 06:23 AM
fulleffect's Avatar
WebProWorld Pro
 
Join Date: Jun 2008
Location: Northeast UK
Posts: 107
fulleffect RepRank 1
Default Re: stocked in making double dynamic dependent select lis in php

I like to do things differently, as my parole officer will testify.

HTML Code:
<select id="selectCar" onchange="location.href=document.getElementById('selectCar').value">
<option>Select Car Make</option>
<option value="http://www.domain.co.uk/cars.php?carname_id=48">Ford</option>
<option value="http://www.domain.co.uk/cars.php?carname_id=56">Honda</option>
</select>

HTML Code:
<select id="selectModel" onchange="location.href=document.getElementById('selectModel').value">
<option>Select Car Model</option>
<option value="http://www.domain.co.uk/cars.php?carname_id=56&carmodel_id=01">220E</option>
<option value="http://www.domain.co.uk/cars.php?carname_id=56&carmodel_id=02">330E</option>
</select>

Needs php code adding in their, to do your selected="selected", and narrow down ur list of models.
__________________

Reply With Quote
Reply

  WebProWorld > Computer Assistance > Programming

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are ecommerce sales taxes dependent on the server's location? Calius eCommerce Discussion Forum 39 02-11-2009 07:39 PM
Is Search Engine ranking loaction dependent iany Search Engine Optimization Forum 5 07-30-2008 06:29 PM
double website files - double content JuniorOnline Search Engine Optimization Forum 2 08-09-2005 11:55 AM
Making Dynamic Web Site Se Friendly AjiNIMC Web Programming Discussion Forum 5 10-26-2004 12:42 PM
Help:Making dynamic pages search engine friendly megame Search Engine Optimization Forum 4 09-07-2004 05:44 PM


All times are GMT -4. The time now is 09:51 PM.



Search Engine Optimization by vBSEO 3.3.0