Changeset 10661


Ignore:
Timestamp:
2005-09-28T15:17:25+12:00 (19 years ago)
Author:
kjdon
Message:

fixed a couple of bugs in updatefqv and updatefqf

File:
1 edited

Legend:

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

    r9668 r10661  
    203203   fqf = argfqf.split(",");
    204204   num_opts = document.QueryForm.fqf[0].options.length; // assumes all have the same  options   
    205    for (i=0; i<fqf.length; i++) \{         
     205   for (i=0; i<fqf.length && i<document.QueryForm.fqf.length; i++) \{
     206     if (fqf[i] != "")\{           
    206207       for (j=0;j<num_opts;j++) \{
    207        if (fqf[i] != "" && fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
     208       if (fqf[i]== document.QueryForm.fqf[i].options[j].value) \{
    208209          document.QueryForm.fqf[i].options[j].selected = true;
    209210          break;   
    210211       \}
    211212    \}
     213     \}
    212214   \}
    213215   if (fqf.length < document.QueryForm.fqf.length) \{ // initialize remaining ones
     
    311313// fqv - the query word/phrase text box       
    312314function initfqv() \{
    313 
    314315   var i;
    315316   fqv= argfqv.split(",");
    316    for (i=0; i<fqv.length; i++) \{
     317   for (i=0; i<fqv.length && i<document.QueryForm.fqv.length; i++) \{
    317318       document.QueryForm.fqv[i].value = fqv[i];
    318319   \}
Note: See TracChangeset for help on using the changeset viewer.