I'm trying to display a widget that is called through another page. The "test" word shows up, but the WIDGET portion does not. I know the address works, I can call it through the url and it displays fine so that's not the problem. It's something within the javascript.

Here's my code:
<script type="text/javascript">
httpRequest("www.addressto/xxx/xxx/recent-widget.php", showrecent);

//Function to display the widget within innerHTML
function showrecent(WIDGET){
 d = document.getElementById('recent-widget');
 d.innerHTML = "test" + WIDGET;

//Function to call HTTPRequest
function httpRequest(url, callback) {
  var httpObj = false;
  if (typeof XMLHttpRequest != 'undefined') {
    httpObj = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
      httpObj = new ActiveXObject('Msxml2.XMLHTTP');
    } catch(e) {
        httpObj = new ActiveXObject('iMicrosoft.XMLHTTP');
      } catch(e) {}
  if (!httpObj) return;
  httpObj.onreadystatechange = function() {
    if (httpObj.readyState == 4) { // when request is complete
  httpObj.open('GET', url, true);


<!-- Div for innerhtml -->
<div id="recent-widget"></div>

Can anyone see what's wrong with it?