Function GetResult_Load (str, sel)
{
Var oBao = new ActiveXObject ("Microsoft. XMLHTTP ");
OBao. open ("POST", "Relating_Menu_Server.asp? ID = "+ escape (str), false );
OBao. send ();
BuildSel_Load (unescape (oBao. responseText), sel)
}
Function BuildSel_Load (str, sel)
{
Sel. options. length = 0;
If (str! = "")
{
Var Tarrstr = new Array ();
Tarrstr = str. split ("% $ #@")
Strid = Tarrstr [0]
Strname = Tarrstr [1]
Var arrstr1 = new Array ();
Arrstr1 = strid. split (",");
Var arrstr2 = new Array ();
Arrstr2 = strname. split (",");
For (var I = 0; I <arrstr1.length; I ++)
{
Sel. options [sel. options. length] = new Option (arrstr2 [I], arrstr1 [I])
}
}
Var opobj = new Option ("-- select --","")
Sel. add (opobj, 0)
Sel. selectedIndex = 0
}
// Load the first drop-down menu on the page
// Configure //----------------------------------------------------------------------------------------
// Sub-Level Association drop-down menu
// Objname = Name of the current menu
// Nextallobj_str = Name set of the sub-level linkage menu, for example, "Level 1 | level 2 | level 3 | Level 4 | ......"
// Str = required relational parameters passed to the Server for data retrieval
// Nextobj = Name of the associated next menu
// Menu call example: onChange = "GetResult (this. name, 'lower-level | Lower-level ', this. value, document. all. Lower-level )"
Function GetResult (objname, nextallobj_str, str, nextobj)
{
Var yy = new Array ();
Yy = nextallobj_str.split ("| ");
For (var I = 0; I <yy. length; I ++) clearoptions (eval ("document. all." + yy [I]);
Var oBao = new ActiveXObject ("Microsoft. XMLHTTP ");
OBao. open ("POST", "Relating_Menu_Server.asp? ID = "+ escape (str), false );
OBao. send ();
BuildSel (unescape (oBao. responseText), nextobj)
}
Function BuildSel (str, sel)
{
Sel. options. length = 0;
If (str! = "")
{
Var Tarrstr = new Array ();
Tarrstr = str. split ("% $ #@")
Strid = Tarrstr [0]
Strname = Tarrstr [1]
Var arrstr1 = new Array ();
Arrstr1 = strid. split (",");
Var arrstr2 = new Array ();
Arrstr2 = strname. split (",");
For (var I = 0; I <arrstr1.length; I ++)
{
Sel. options [sel. options. length] = new Option (arrstr2 [I], arrstr1 [I])
}
}
Var opobj = new Option ("-- select --","")
Sel. add (opobj, 0)
Sel. selectedIndex = 0
}
Function clearoptions (obj)
{
For (var j = 0; j <= obj. length; j ++) obj. remove (0)
Var opobj = new Option ("-- select --","")
Obj. add (opobj, 0)
Obj. selectedIndex = 0
}