/[drupal]/contributions/modules/FixedDataDropdown/FixedDataDropdown.js
ViewVC logotype

Contents of /contributions/modules/FixedDataDropdown/FixedDataDropdown.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Fri Jun 15 13:24:33 2007 UTC (2 years, 5 months ago) by markfoodyburton
Branch: MAIN
CVS Tags: DRUPAL-5--1-3, DRUPAL-5--1-2, HEAD
Changes since 1.1: +1 -1 lines
File MIME type: text/javascript
added ?q= tot he .js file, to handle non friendly URLs
1 // $Id $
2 // Author: Mark Burton
3
4 // its ok to have one per page, as the user cant put the mouse on 2 different
5 // autocompletes at once...
6 var fieldid;
7 function fdd_updater()
8 {
9 selection=$('.fixedDataDropdown_selector').filter('[@id*='+fieldid+']').val();
10
11 $('.fixedDataDropdown_value').filter('[@id*='+fieldid+']').removeOption(/./).ajaxAddOption("?q=/fixedDataDropdown/autocomplete/"+fieldid+"/"+selection);
12 }
13 var t;
14
15 if (Drupal.jsEnabled) {
16 $(document).ready(
17 function() {
18 $('.fixedDataDropdown_selector').keyup (
19 function() {
20 fieldid=this.id;
21 clearTimeout(t);
22 t=setTimeout("fdd_updater()",800);
23 });
24
25 });
26
27 };
28

  ViewVC Help
Powered by ViewVC 1.1.2