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 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区