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 |
101 |
// alert('load_template '+template_name+' old template is '+$('template_name').value); |
8 |
|
|
|
9 |
|
|
$('template_name').value = template_name; |
10 |
|
|
|
11 |
dpavlin |
104 |
new Ajax.Updater( 'results', '/results', { |
12 |
dpavlin |
101 |
parameters: Form.serialize( $('results_form') ), |
13 |
|
|
asynchronous: 1, |
14 |
|
|
onLoading: function(request) { |
15 |
|
|
Effect.Appear('searching'); |
16 |
|
|
}, |
17 |
|
|
onLoaded: function(request) { |
18 |
|
|
Effect.Fade('searching'); |
19 |
|
|
} |
20 |
|
|
} ) ; |
21 |
|
|
return false; |
22 |
dpavlin |
97 |
} |