Changeset 7262 for trunk


Ignore:
Timestamp:
2004-05-03T15:26:48+12:00 (20 years ago)
Author:
kjdon
Message:

fixed a small bug with the initfqf function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/query.dm

    r6541 r7262  
    193193function initfqf() \{
    194194   var i;
    195    fqf = argfqf.split(",");   
    196    for (i=0; i<fqf.length; i++) \{
    197        for (j=0;j<document.QueryForm.fqf[i].options.length;j++) \{
     195   fqf = argfqf.split(",");
     196   num_opts = document.QueryForm.fqf[0].options.length; // assumes all have the same  options   
     197   for (i=0; i<fqf.length; i++) \{         
     198       for (j=0;j<num_opts;j++) \{
    198199       if (fqf[i] != "" && fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
    199200          document.QueryForm.fqf[i].options[j].selected = true;
     
    205206      for (i=fqf.length;i<document.QueryForm.fqf.length;i++) \{
    206207      var z=i;
    207       while (z >= document.QueryForm.fqf[i].options.length-1) \{
    208          z = z-(document.QueryForm.fqf[i].options.length-1);
     208      while (z >= num_opts) \{
     209         z = z-(num_opts);
    209210      \}
    210211      document.QueryForm.fqf[i].options[z].selected = true;
Note: See TracChangeset for help on using the changeset viewer.