irm-1.6-b3/include/lookups.class.php
/*
		** Creates the HTML for a dropdown from the currently loaded
		** lookup. Must call getLookup before using.
		** This function replaces both Dropdown() and Dropdown_value()
		**
		**   string dropdownName: name of the select statement
		**   string selectedValue: name of the value to be selected by default
		**
		**   Returns:
		**      string: HTML code generated
		*/
Creates the HTML for a dropdown from the currently loaded
lookup. Must call getLookup before using.
This function replaces both Dropdown() and Dropdown_value()

string dropdownName: name of the select statement
string selectedValue: name of the value to be selected by default

HTML code generated
Creates the HTML for a dropdown from the currently loaded lookup . Must call getLookup before using . This function replaces both Dropdown () and Dropdown_value () string dropdownName : name of the select statement string selectedValue : name of the value to be selected by default HTML code generated
function dropdown($dropdownName, $selectedValue = '')
		{
			$output = '';
			if ($this->lookupId)
			{
				$output = "<select name=\"$dropdownName\">\n";
				foreach ($this->lookupValues as $value)
				{
					$output .= "<option value=\"$value\"";
					if ($selectedValue == $value) $output .= " selected";
					$output .= ">$value</option>\n";
				}
				$output .= "</select>\n";
			}
			return $output;
		}
function dropdown ( $ dropdownName , $ selectedValue = '' ) { $ output = '' ; if ( $ this -> lookupId ) { $ output = " <select name= \" $ dropdownName \" > \n " ; foreach ( $ this -> lookupValues as $ value ) { $ output .= " <option value= \" $ value \" " ; if ( $ selectedValue == $ value ) $ output .= "  selected " ; $ output .= " > $ value </option> \n " ; } $ output .= " </select> \n " ; } return $ output ; }
Creates the HTML for a dropdown from the currently loaded
 lookup.
Creates the HTML for a dropdown from the currently loaded lookup .