2 document.getElementById('search-entry-box').focus();
3 mw.sdump('D_CAT','TESTING: cat.js: ' + mw.G['main_test_variable'] + '\n');
5 'search-copy-count-menu',
6 'search-copy-count-popup',
11 function search(s_type, s_loc, s_fmt, s_ord, s_term) {
12 var w_type = document.getElementById(s_type);
13 var w_loc = document.getElementById(s_loc);
14 var w_fmt = document.getElementById(s_fmt);
15 var w_term = document.getElementById(s_term);
16 var w_order = document.getElementById(s_ord);
17 var frame_box = document.getElementById('cat_result_box');
18 while (frame_box.lastChild) { frame_box.removeChild(frame_box.lastChild); }
19 switch(w_type.value) {
21 alert('Not Yet Implemented');
24 alert('Not Yet Implemented');
26 case 'title': case 'author': case 'tcn': case 'subject':
27 var frame = document.createElement('iframe');
28 frame_box.appendChild(frame);
29 frame.setAttribute('flex','1');
30 frame.setAttribute('src','chrome://evergreen/content/cat/record_list.xul');
31 frame.contentWindow.parentWindow = parentWindow;
32 frame.contentWindow.search_term = w_term.value;
33 frame.contentWindow.search_type = w_type.value;
34 frame.contentWindow.search_location = w_loc.value;
35 frame.contentWindow.search_order = w_order.value;
36 frame.contentWindow.catWindow = this;
37 frame.contentWindow.tabWindow = tabWindow;
38 frame.contentWindow.mw = mw;
39 frame.contentWindow.am_i_a_top_level_tab = false;
40 mw.sdump('D_CAT','here ====>\n');
41 frame.contentWindow.addEventListener('load',function (e) { mw.sdump('D_CAT','here1<==\n'); this.test_hash['hello1'] = 'boo'; }, false);
42 frame.contentWindow.addEventListener('load',function (e) { mw.sdump('D_CAT','here2<==\n'); this.test_hash['hello2'] = 'boo'; }, false);
45 alert('Not Yet Implemented');
48 alert('Not Yet Implemented');
51 alert('Not Yet Implemented');
54 alert('This case is not handled: ' + w_type.value);