Example Form:

...
In the HEAD section:
....
<script src="http://ajax.recruitonline.com.au/ajax/form.countries/ajax.js" type="text/javascript"></script>
....

The BODY tag onload Javascript:
...
<body onload="doLoad('location_form', 'country', 'state', '$default_country', '$default_state')">
...


The FORM {named in this case 'location_form'} ELEMENTS
...
<select name="country" onchange="populateStateRecruitOnline(this.value);"></select>
...
<select name="state"></select>
...
Country: $default_country Country is currently: Australia
State: $default_state State is currently: N/A

To get around cross site scripting you need a proxy called ajax.proxy.php file in the same directory as the script:
<?php
$lines = file('http://ajax.recruitonline.com.au/ajax/form.countries/index.php?' . $_SERVER['QUERY_STRING']);
foreach ($lines as $line_num => $line)
{
    echo $line . "\n";
}
?>