I want to use ajax to fill input fields depending on the select element

Code:
<select name="service" onchange="fillFields(this.options[this.selectedIndex].value)">
Js code looks like:

Code:
function fillFields(inc){
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
...