Page 1 of 1

I broke it...

Posted: Thu Oct 21, 2010 6:42 pm
by me!
I normally don't work with Javascript so I have no clue what I am doing...

I just embarked on a project that has AJAX and light boxes. Each works fine by it's self but the first function (the AJAX one) wont work with the light box function.

I have no clue?

Code: Select all


<script type="text/javascript">
var http = false;

if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}

function lookup(callsign) {
  http.abort();
  http.open("GET", "includes/lookup.php?name=" + callsign, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById('call_info').innerHTML = http.responseText;
    }
  }
  http.send(null);
}

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;

</script>

Re: I broke it...

Posted: Thu Oct 21, 2010 8:05 pm
by me!
I found it!

I was missing the } at he end of the last function! :lol: