•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,836 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,566 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2724 | Replies: 34 | Solved
![]() |
•
•
Join Date: Aug 2007
Posts: 154
Reputation:
Rep Power: 0
Solved Threads: 0
Hi.
I don't know what is wrong with the following attachment, actually I have two drop down list on my html form, and which is one retrieving the value from MySQL table, and the second is dependent to the first one, and that one also gets its value from another MySQL table Using AJAX technology.
Can anyone help me through this case?
I don't know what is wrong with the following attachment, actually I have two drop down list on my html form, and which is one retrieving the value from MySQL table, and the second is dependent to the first one, and that one also gets its value from another MySQL table Using AJAX technology.
Can anyone help me through this case?
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 238
Sorry ! I don't know much about ajax+xml. Maybe you will understand what he's saying.
Check this out.
http://james.revillini.com/2006/10/2...cript-console/ and
http://james.revillini.com/2006/10/2...onsole-part-2/ All the best!
Check this out.
http://james.revillini.com/2006/10/2...cript-console/ and
http://james.revillini.com/2006/10/2...onsole-part-2/ All the best!
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Sep 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 1
The problem in your code is that this block of code:
is commented, thus javascript can't load it.
Also, you load the faculty member's name, instead of their ID, as the "value" of the option in the first drop down. You have it coded to work correctly this way (in the query just above the commented code above), but the queries will be faster if you use the unique id for each member in the where condition of the query.
/*
while($department = mysql_fetch_array($resultDepartment)){
$xml = $xml . '<faculty name="$department['f_name']">';
$xml = $xml . '<department id= "$department['dep_id']"> $department['dep_name'] </department>';
$xml = $xml . '</faculty>';
}Also, you load the faculty member's name, instead of their ID, as the "value" of the option in the first drop down. You have it coded to work correctly this way (in the query just above the commented code above), but the queries will be faster if you use the unique id for each member in the where condition of the query.
Last edited by badbart : Jul 7th, 2008 at 5:30 pm. Reason: formatting fixed
•
•
Join Date: Sep 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 1
Hmmm....
I'm also not an AJAX pro, nor am I even a fan, thus I've been unable to get your code to work on my system (I keep getting a Javascript error on this line:
Sorry, I'll have to leave you in the hands of the AJAX experts.
I'm also not an AJAX pro, nor am I even a fan, thus I've been unable to get your code to work on my system (I keep getting a Javascript error on this line:
PopulateDepartmentList(XmlHttpObj.responseXML.documentElement);
Sorry, I'll have to leave you in the hands of the AJAX experts.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
- Previous Thread: Publishing php/mysql on Apache website
- Next Thread: How many queries can be preformed in one click?



Linear Mode