3 * A singleton object/function for routing XML responses to the proper handlers, based on the text in the <caller> tag of the XML response.
4 * @author Chris Carpita <csc32@cornell.edu>
7 JSAN.use('CXGN.Hotlist');
8 JSAN.use('CXGN.Fasta');
9 JSAN.use('CXGN.UserPrefs');
11 JSAN.use('CXGN.Base');
13 //JSAN.use('CXGN.blipblop');
14 //For every possible caller, we should include its module. More than likely, it's not necessary, since the caller usually exists
15 //in the first place to make the AJAX call, but it's possible that one object may send an XML response to another object by using the 'wrong'
16 //<caller> tag. Mostly for things that I can't imagine.
18 function XMLroute (responseXML) {
19 var doc = responseXML;
20 var callerTag = doc.getElementsByTagName("caller")[0];
23 caller = callerTag.firstChild.nodeValue;
25 if(caller=="Hotlist") {
26 Hotlist._response(doc);
31 if(caller=="UserPrefs"){
32 UserPrefs._response(doc);
34 //else if (caller == "blipblop" )
35 // blipblop.responseOrSomethingElse(doc)