Here's what I want to do:
When a user starts to type in a document name into a text box, the autosuggest fills in the rest of the name of the document. This part already works no problem. Then, when the user clicks on the search button, I want the document to be loaded on the webpage. So far, I have been able to get a JavaScript popup to tell me which document I selected.

The JavaScript code that I have is:
Code:
<script type="text/javascript">
function disp_alert()
{
var txt=document.getElementById("document").value
alert("You selected "+ txt);
}
</script>
The above code works, and is pulling from my xml file, but it's just telling me what I put into the text box. I really want it to link to the document or page it's supposed to link to.

The XML code that I have is:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<documents>
	<document id="1">
		<name>Fax Form 1</name>
	</document>	
	<document id="2">
		<name>Fax Form 2</name>
	</document>
	<document id="3">
		<name>Fax Form 3</name>
	</document>	
</documents>
Now, I know there should be code in my xml file to link to the forms, but I have been trying to figure that out but can't.

Can anyone please help me?

Thank you!