/[webpac2]/Webpacus/root/js/webpac.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /Webpacus/root/js/webpac.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 138 - (hide annotations)
Thu Nov 24 22:29:44 2005 UTC (18 years, 5 months ago) by dpavlin
File MIME type: text/cpp
File size: 1084 byte(s)
 r9112@llin:  dpavlin | 2005-11-24 23:30:01 +0100
 changing of templates again work. with a little more testing this will be
 0.02 version :-)

1 dpavlin 97 // WebPAC AJAX API
2     //
3     // Documented in this code only, I'm afraid. Beware of dragons!
4     // Dobrica Pavlinusic dpavlin(at)rot13(dot)org 2005-11-22
5    
6     function load_template(template_name) {
7 dpavlin 137 Logger.info('load_template '+template_name+' old template is '+$('template_name').value);
8 dpavlin 101
9     $('template_name').value = template_name;
10    
11 dpavlin 138 var results_form = $('results_form');
12 dpavlin 137
13 dpavlin 138 if (results_form) {
14     Logger.debug('Ajax.Updater(results,/results)');
15    
16     new Ajax.Updater( 'results', '/results', {
17     parameters: Form.serialize( results_form ),
18     asynchronous: 1,
19     onLoading: function(request) {
20     show_searching();
21     },
22     onLoaded: function(request) {
23     hide_searching();
24     }
25     } ) ;
26     return false;
27     } else {
28     Logger.debug('no results_form element');
29     return undef;
30     }
31 dpavlin 97 }
32 dpavlin 106
33     function show_searching() {
34 dpavlin 138 Logger.debug('show_searching');
35 dpavlin 106 Element.show('searching');
36 dpavlin 136 new Effect.Fade('results', { duration: 0.3 });
37 dpavlin 106 }
38    
39     function hide_searching() {
40 dpavlin 138 Logger.debug('hide_searching');
41 dpavlin 106 Element.hide('searching');
42 dpavlin 132 //new Effect.Highlight('results');
43 dpavlin 136 new Effect.Appear('results', { duration: 0.3 });
44 dpavlin 106 }
45    

Properties

Name Value
svn:mime-type text/cpp

  ViewVC Help
Powered by ViewVC 1.1.26