missing1314521 2011-07-02 10:22
浏览 243
已采纳

ssh跳转问题,百思不得其解

1.在一个JSP页面上通过脚本获得一个值

var xhr = null; function createXHR(){ try{ xhr = new XMLHttpRequest(); }catch(e){ xhr = new ActiveXObject("Microsoft.XMLHTTP"); } } function checkDept(){ //1.创建xhr对象 createXHR(); //2.设置回调函数 xhr.onreadystatechange = handlCallback; var selectDept = document.getElementById("selectDept").value; //3.初始化 xhr.open("GET","../usermanage/baseprice_checkPositonByDept?selectDept="+selectDept,true); //4.发送数据 xhr.send(null); } function handlCallback(){ ..... }

2.在action里的方法

public String checkPositonByDept()
{
//通过从user_baseprice_add.jsp页面的ajax里获得的department的name查到id
List deptlist=departmentAction.selectIdByName(selectDept);
int deptid=deptlist.get(0);
//通过刚查到的deptid从postion查出里面pos_dept_id=deptid的职位的pos_name
List poslist=postionAction.selectNameByDeptName(deptid);
ActionContext.getContext().put("poslist", poslist);
return "posok";
}
3.struts.xml里配置

/budget/user_baseprice_show.jsp
/budget/user_baseprice_add.jsp
/budget/MyJsp.jsp

4.问题:!!!
不执行跳转,不报错。请问各位大哥如何解决此问题,感激不尽

  • 写回答

1条回答 默认 最新

  • iteye_17482 2011-07-02 14:54
    关注

    晕,你用的ajax来让它跳转?我不知道具体怎么实现,但是没这么用的啊,ajax就是为了无刷新而使用的,你让它跳转到其他页面用ajax作甚?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题