SuW
asked on
PHP and XML combobox autofilling
Hello, i have 2 comboboxes on a page that i am filling through XML, the first one is working fine, but i can't get the second one to be populated correctly, it should be populated depending on the selection of the first combobox! is there any other way than AJAX to get this done ? ..
if not, how could i get that done using AJAX ?
below is the code i'm using.. the javascript does alert the correct value, but i can not get it into php inorder to request the data from my XML upon that value!
also, i do not want to get the page reloaded inorder to get the value throuhg GET or POST!
Thank you.. below is the code i'm using..
if not, how could i get that done using AJAX ?
below is the code i'm using.. the javascript does alert the correct value, but i can not get it into php inorder to request the data from my XML upon that value!
also, i do not want to get the page reloaded inorder to get the value throuhg GET or POST!
Thank you.. below is the code i'm using..
<form action="load.php" method="post">Select Cat<select name="categories" id="categories">
<?php
$fff = '<script type="text/javascript">';
$fff .= 'function getMainCat() {';
$fff .= "var x = document.getElementById('categories').value;";
$fff .= 'alert(x); }';
$fff .= '</script>';
?>
</select><br /><br />Select Sub Category<select name="sub_categories" id="sub_categories" onchange="getMainCat();">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER