jmcgranahan 0 Newbie Poster

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 (, 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" ?>
  <ModulePrefs title="Vanderbilt Library Search" height="300" width="200" author="Jamen McGranahan" author_email="" description="Search Vanderbilts library catalog" thumbnail="" />
  <Content type="html">
<script language="javascript" type="text/javascript">
function ajaxFunction(){
  var ajaxRequest;
    ajaxRequest = new XMLHttpRequest();
  } catch (e){
      ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        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;'GET', ''+term, true);
<form name='myForm'>
Search term(s): <input type='text' name='searchterm' id='searchterm' />
<input type='submit' value='submit' onClick="ajaxFunction();" />
<br />
<div id="time2"></div>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.