yanmin

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  16 随笔 :: 1 文章 :: 9 评论 :: 0 Trackbacks
function AddItem(setter,dropdownValue){
  // obtain the dropdownlist control
  var ct1 = null;
  if (setter == "OperateDoctor1"){
   ctl = document.OTRequestForm.ddOperateDoctor1Subspecialty;
  }
  if (setter == "OperateDoctor2"){
   ctl = document.OTRequestForm.ddOperateDoctor2Subspecialty;
  }
  if (setter == "RequestDoctor"){
   ctl = document.OTRequestForm.ddRequestDoctorSubspecialty;
  }
  if (ctl != null){
   clearDropdown(ctl);
  }
  // get the text and value
  var subSpecInfo =  dropdownValue.split("&&");
  for (i=0; i<subSpecInfo.length; i++){
   // create a new option
   var newOpt = document.createElement("option");
   var subSpec = subSpecInfo[i].split("|");
   newOpt.text = subSpec[1];
   newOpt.value = subSpec[0];
   ctl.add(newOpt);
  }
   
}
posted on 2006-09-01 17:11 yanmin 阅读(514) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: