I had a simple ajax function (note: this is not an ajax question) that was working fine:
[CODE]function ajaxFunction()
…
document.myForm.my_field_name.innerHTML = ajaxRequest.responseText;
…
ajaxRequest.open(“GET”, “/ajax/fieldlist.php?value=” + document.myForm.my_other_field_name.value, true);
I want to make the fields dynamic, so I passed them in the function parameters, and now it isn’t working:
[CODE]function ajaxFunction(modifyfield,targetfield)
…
document.myForm.getElementById(targetfield).innerHTML = ajaxRequest.responseText;
…
ajaxRequest.open(“GET”, “/ajax/fieldlist.php?value=” + document.myForm.getElementById(modifyfield).value, true);
Any help would be greatly appreciated. I’m very confused here.