/*
geoquiz.js
Author: Larry Ching
Date Created: Feb 13, 2006
Tests the servlet that queries World.sql by sending in just one simple query.

Requires: ContentLoader.js
====================
Based on code written by Elaine Haight, Jan. 2007
Modified: Feb 15, 2007 - added handling for responseXML == null ; 
  put URL for worldquery.php directly into  makeAndSendQuery().
Modified: Feb. 22, 2007 - Moved callback function writeAnswerHint() to geoquiz_handler.js 
  because the callback function interacts with page elements.
Modified: Mar. 28, 207 - Changed for Soulbeams.net hosting.
*/

// creates the ContentLoader object that contains the query and sends it along to the servlet
function makeAndSendQuery(thequery){
  // Creates new instance of ContentLoader with sql query and callback function
  var sqlquery_contentLoader = new net.ContentLoader("worldquery.php", writeAnswerHint, errorFunction, "POST", thequery);
}


// called by the ContentLoader when there is an error with the request
function errorFunction(){
	var divTag = document.getElementById("catanswer");
	divTag.firstChild.nodeValue += "ERROR ACCESSING DATABASE: " + this.req.responseText;
}


  
