troubleshooting Question

live search of xml file

Avatar of chrisj1963
chrisj1963 asked on
JavaScriptPHP
20 Comments1 Solution444 ViewsLast Modified:
Hi,
I have a script that does a live search of an array of data (starting at line 59).

I would like this script to pull its results from the xml file here http://www.prontopage.net/livesearch/link.xml but I would like the search to be performed on the "search_terms" column and the "result" column to be what is displayed.

the original search file using the array is here: http://www.prontopage.net/livesearch/autocomplete2.htm (and I have attached that code.

Can anyone help me change the attached to search and produce results from the xml file as requested?
Thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Reverse autocomplete</title>

<style type="text/css">
	.suggestion_list
	{
	background: white;
	border: 1px solid;
	padding: 4px;
	}
	
	.suggestion_list ul
	{
	padding: 0;
	margin: 0;
	list-style-type: none;
	}
	
	.suggestion_list a
	{
	text-decoration: none;
	color: navy;
	}
	
	.suggestion_list .selected
	{
	background: navy;
	color: white;
	}
	
	.suggestion_list .selected a
	{
	color: white;
	}

	#autosuggest
	{
	display: none;
	}
    </style>
    <script language="Javascript" src="autocomplete1_files/autosuggest.js"></script>
    <script language="Javascript" src="autocomplete1_files/cursor.js"></script>
</head><body onload="setup()">
<div style="position: absolute; left: 98px; top: 2814px; display: none;" class="suggestion_list" id="autosuggest"><ul><li class="selected"><a href="javascript:false">William Harrison</a></li><li class=""><a href="javascript:false">Benjamin Harrison</a></li></ul></div>
<div style="width: 70%; float: left;">
  <h3><br></h3>

<table border="1" rules="none">
<tbody><tr>
<td width="320"><center><br>
</center>
<center>
Bidirectional autocomplete, also appending at both ends [<a href="#n2">note</a>]:<br>
<form onsubmit=";" name="test3" id="test3" action="autocomplete.html#l3">
<input value="William Harrniso" autocomplete="off" name="textbox2" id="textbox2" onclick="return(update(this))" onkeyup="return(update(this))" onkeydown="return(update(this))" onkeypress="return(update(this))" onmouseup="return(update(this))" onmousedown="return(update(this))" type="text">
		<script language="Javascript">
			var pres3 = new Array("George Washington","John Adams","Thomas Jefferson","James Madison","James Monroe","John Quincy Adams","Andrew Jackson","Martin Van Buren",
	"William Harrison","John Tyler","James Polk","Zachary Taylor","Millard Fillmore","Franklin Pierce","James Buchanan","Abraham Lincoln","Andrew Johnson",
	"Ulysses Grant","Rutherford Hayes","James Garfield","Chester Arthur","Grover Cleveland","Benjamin Harrison","Grover Cleveland","William McKinley","Theodore Roosevelt",
	"William Taft","Woodrow Wilson","Warren Harding","Calvin Coolidge","Herbert Hoover","Franklin Roosevelt","Harry Truman","Dwight Eisenhower","John F. Kennedy",
	"Lyndon Johnson","Richard Nixon","Gerald Ford","Jimmy Carter","Ronald Reagan","George H. Bush","Bill Clinton","George W. Bush");
			new AutoSuggest3(document.getElementById('textbox2'),pres3);
		</script>
</form>
</center>
<label for="leftbox"><input type="hidden" id="leftbox" name="leftbox" maxlength="32" size="15" value="William&nbsp;H" disabled="disabled"></label>&nbsp;<label for="rightbox"><input type="hidden" id="rightbox" name="rightbox" maxlength="32" size="15" value="arrniso" disabled="disabled"></label>
</td>
<td width="10%">
</td>
<td>

<i>Enter names of American presidents (autocomplete is done on the whole name)... <br>
Try for example "Theodore Roosevelt", then change "Theodore" to "Franklin".</i>
</td>
</tr>
</tbody></table>
</div>

</body></html>
ASKER CERTIFIED SOLUTION
Beverley Portlock

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 20 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 20 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros