/[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

Diff of /Webpacus/root/js/webpac.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 325 by dpavlin, Sun Dec 25 23:32:01 2005 UTC revision 326 by dpavlin, Mon Dec 26 20:10:52 2005 UTC
# Line 54  Object.extend(Object.extend(WebPAC.Sugge Line 54  Object.extend(Object.extend(WebPAC.Sugge
54      if(this.options.defaultParams)      if(this.options.defaultParams)
55        this.options.parameters += '&' + this.options.defaultParams;        this.options.parameters += '&' + this.options.defaultParams;
56    
57      Logger.debug('WebPAC.Suggest called '+this.url);      var form = $('results_form');
58      new Ajax.Request(this.url, this.options);      var inputs = form.getElementsByTagName('input');
59        var name = '_database';
60    
61        var matchingInputs = new Array();
62        for (var i = 0; i < inputs.length; i++) {
63          var input = inputs[i];
64          if (input.name != name || !input.checked) continue;
65          Logger.debug('keeping '+name+'='+input.value);
66          matchingInputs.push(name+'='+input.value);
67        }
68    
69        // construct arguments for url
70        var args = '';
71        var pos = this.url.indexOf('?');
72        if (pos == -1) {
73          args += '?';
74        } else {
75          args += '&';
76        }
77        args += matchingInputs.join('&');
78    
79        Logger.debug('WebPAC.Suggest called '+this.url+args);
80        new Ajax.Request(this.url+args, this.options);
81    },    },
82    
83    onComplete: function(request) {    onComplete: function(request) {

Legend:
Removed from v.325  
changed lines
  Added in v.326

  ViewVC Help
Powered by ViewVC 1.1.26