1 sdump('D_OPAC','Loading opac.js\n');
3 var OPAC_URL = "http://spacely.georgialibraries.org:8080/";
7 /* listen for page changes */
8 var progressListener = new Object();
9 progressListener.onProgressChange = function(){}
10 progressListener.onLocationChange = function(){}
11 progressListener.onStatusChange = function(){}
12 progressListener.onSecurityChange = function(){}
13 progressListener.QueryInterface = function qi(iid) { return this; }
14 progressListener.onStateChange =
15 function client_statechange ( webProgress, request, stateFlags, status) {
16 if( stateFlags == 131088 ) set_opac_vars();
21 function opac_init(p) {
22 sdump('D_OPAC',"Initing OPAC\n");
24 p.opac_iframe = p.w.document.getElementById('opac_opac_iframe');
25 p.opac_iframe.addProgressListener(progressListener,
26 Components.interfaces.nsIWebProgress.NOTIFY_ALL );
27 p.opac_iframe.setAttribute("src", OPAC_URL)
30 /* shoves data into the OPAC's space */
31 function set_opac_vars() {
32 var p = opac_page_thing;
33 p.opac_iframe = p.w.document.getElementById('opac_opac_iframe');
34 p.opac_iframe.contentWindow.IAMXUL = true;
35 p.opac_iframe.contentWindow.xulG = mw.G;
36 p.opac_iframe.contentWindow.attachEvt("rresult", "recordDrawn", opac_make_details_page);
39 function opac_make_details_page(id, node) {
40 //dump("Node HREF attribute is: " + node.getAttribute("href") + "\n and doc id is " + id);
41 //alert("Node HREF attribute is: " + node.getAttribute("href") + "\n and doc id is " + id);
45 /* --------------------------------------------------------------------------
47 -------------------------------------------------------------------------- */
48 function opac_build_navigation(p) {
49 p.webForward = function webForward() {
51 if(p.opac_iframe.webNavigation.canGoForward)
52 p.opac_iframe.webNavigation.goForward();
54 sdump('D_OPAC','goForward error: ' + js2JSON(E) + '\n');
58 p.webBack = function webBack() {
60 if(p.opac_iframe.webNavigation.canGoBack)
61 p.opac_iframe.webNavigation.goBack();
63 sdump('D_OPAC','goBack error: ' + js2JSON(E) + '\n');