Contents MDDB Report Viewer Methods Previous Next

_OUTPUT_VAR_FUNCTIONS_ Method

Outputs JavaScript functions for ordering variable selections

Syntax

 CALL SEND(OBJID,'_OUTPUT_VAR_FUNCTIONS_');                

Example

The following output is produced:

function List(list) {
   for (key in list)
      if (list[key] != null) this[key]= list[key];
}

function change(select) {
   if ((navigator.appName == "Netscape" &&
        navigator.appVersion.indexOf("3.0") != -1) ||
       (navigator.appName == "Microsoft Internet Explorer" &&
        navigator.appVersion.indexOf("4.0") != -1)) {
      selected= new List;
      options= new Object;
      for (i= 0; i < select.options.length; i++) {
         options[select.options[i].text]=select.options[i].value;
         selected[select.options[i].text]=
            select.options[i].selected ? select.options[i].value : null;
      }
      selected= new List(selected);
      select.options.length= 0;
      for (key in selected)
         select.options[select.options.length]=
            new Option(key, selected[key], false, true);
      for (key in options)
         if (selected[key] == null)
            select.options[select.options.length]=
               new Option(key, options[key]);
   }
}

function update() {
   str= "";
   for (key in selected)
      str= str + key + ",";
   if (str.length)
      document.form.order.value= str.substring(0, str.length - 1);
} 

             

Contents MDDB Report Viewer Methods Previous Next