I have searched and search for a simple solution to my problem but alas, I have had no luck, so I am turning to this forum for assistance. If you are familiar with Google Gadgets and AJAX, then this question is for you. I am trying to create a Google Gadget that allows one to dynamically search our catalog and display the results within that iFrame. I've been able to do this successfully outside of the gadgets (http://newtitles.library.vanderbilt.edu/webservices/test.html), so I know the premise should work. However, whenever I try it within a Google gadget, I get a malformed URL error, which does not make any sense to me. If you have any suggestions, I would greatly appreciate it. Here is the code:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="Vanderbilt Library Search" height="300" width="200" author="Jamen McGranahan" author_email="jamen.mcgranahan@vanderbilt.edu" description="Search Vanderbilts library catalog" thumbnail="http://acorn.library.vanderbilt.edu/WebCat_Images/English/Other/Miscil/ACORN.gif" />
  <Content type="html">
    <![CDATA[
<script language="javascript" type="text/javascript">
<!--
function ajaxFunction(){
  var ajaxRequest;
  try{
    ajaxRequest = new XMLHttpRequest();
  } catch (e){
    try{
      ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try{
        ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e){
        alert("Your browser broke!");
        return false;
      }
    }
  }
  ajaxRequest.onreadystatechange = function(){
    if(ajaxRequest.readyState == 4){
      document.getElementById("time2").innerHTML = ajaxRequest.responseText;
    }
  }
  var term = document.getElementById('searchterm').value;
  ajaxRequest.open('GET', 'http://newtitles.library.vanderbilt.edu/webservices/webservice3.php?searchterm='+term, true);
  ajaxRequest.send(null);
}
//-->
</script>
<form name='myForm'>
Search term(s): <input type='text' name='searchterm' id='searchterm' />
<input type='submit' value='submit' onClick="ajaxFunction();" />
<br />
</form>
<div id="time2"></div>
    ]]>
  </Content>
</Module>