Grats and welcome. :) I'm not total sure what you mean by "unafraid i cant call the ajax from any ather way then that way".
But just in case it is useful, you could also get the form with
which would let you do send the name in as a parameter to a function.
function showUser(str, frm)
url=url+"&type=" + document.forms[frm].type.value;