HELP! * GREY=local LOCAL HTML version of Foils prepared 15 January 1997

Foil 81 Create Select Field Dynamically

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * See also color IMAGE

else { // Case when enough options for a select field
top.fred.document.writeln('<select name="' + groupname + '" onChange="' + onprocess + '(this,this.options[this.selectedIndex],(1+this.selectedIndex))" >');
  • for( var i=1; i <= number ; i++) {
  • var ifselected = ' ';
  • if( i == indexselected )
  • ifselected = ' SELECTED ';
  • top.fred.document.writeln('<option ' + ifselected + 'value="' + indname[i] + '" >' + indname[i]);
  • } // End for loop
top.fred.document.writeln('</select>');
} // End else for generating select field
} // End of flexbuttons



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat May 24 1997