Hey,
Were I am stuck is with the jquery
I have a form that is done in a form class and when an option is selected from the dynamically populated drop down menu I would like it to fill in the text boxes so they can be edited.
I currently have:
getfeed.php - the page that is connected to the javascript
<?php
include('class/class.form.php');
include('class/class.users.php');
$iID = trim($_GET['extension']);
if(!$iID) die('No User Data found.');
$getValues = new Extension();
$user_info = $getValues->getUsersInformation($iID);
$sip_info = $getValues->getSipInformation($iID);
//print_r($user_info);
//print_r($sip_info);
$array = $getValues->getUsersInformation($iID);
echo '<br /><br />-- end of query --';
The Javascript
if(document.id('LoadExtension') && document.id('ExtensionResponse')) { // id of select box
var sel = document.id('LoadExtension'); // ser select box as var.
sel.addEvent('change', function(chg) { // add change event to select box.
if(sel.getSelected().get('value') != '') { // on change if selected value is not empty.
new Request.HTML({
url : 'http://Domain.co.nz/Air/includes/getFeed.php?extension='+ sel.getSelected().get('value'),
onRequest: function() {
document.id('ExtensionResponse').set('html', 'loading...');
},
onComplete: function(r1, r2, html, js) {
document.id('ExtensionResponse').set('html', html);
}
}).send();
}
});
}
At the moment it does not load any data(I somehow need to get the $iID sent from the index.php but the drop down menu is a count array would I take it from this?) and is in a separate div below the form.