var formvals = new Array(); //initialization function function pre_set_form_vals() { pre_set_form_vals_action('',formvals) } /* ************************************************************** function: get_preset_form_val description: retrieves the value from the js array params: field_name - the field name to retrieve dataset - the array subset to look at ************************************************************** */ function get_preset_form_val(field_name) { try { if(formvals[field_name]==undefined) { return ""; } else { return (formvals[field_name]) } } catch(e) { return ""; } return "" } //flips through sets of elements and arrays function pre_set_form_vals_action(form_id,dataset) { inp_st=document.getElementsByTagName("input") var checked_box_set = new Array() for(i=0;i1) //its an array of check boxes { Pre_Select_Check_Box_Set(box_set,inp_st[i].name.substring(inp_st[i].name.length-2)) } else //its a lone checkbox { if(!(get_preset_form_val(inp_st[i].name)=="")) { inp_st[i].checked=true } } } break } } } inp_st=document.getElementsByTagName("select") for(i=0;i < inp_st.length; i++) { Pre_Select_Option_Box(get_preset_form_val(inp_st[i].name),inp_st[i]) } } function Pre_Select_Option_Box(option,obj) { opts=obj.options.length var x=0 while(x