I have a jsp page with button(worklistManager.jsp)... in button on click, am calling one function(getModify()) which is inside js file(utility.js).. inside that function, am doing some action and forwarding that values to next jsp page(modify.jsp) using window.location.href... the modify.jsp page should open as popup window... when i click button, it has to call the function and open the modify.jsp page as popup window... how to get this...
worklistManager.jsp:
Code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="script/Utility.js" data-dojo-config="parseOnLoad: true"></script>
</head>
<body>
<div dojotype="dijit.MenuBarItem" id="SearchMenu21" onclick="getModify();" style="font-size:11pt;" title="menuBarItem">
<img class="images" id="SearchMenu21" name="search5.png" onclick="setImgProperty(this.id)" src="images/uploads/search.png" style="height:20px; width:20px;">
Modify
</div>
</body>
</html>
utility.js file:
Code:
function getModify(){
var whereCondn = "";
//alert(gbshowgridFlag);
if(dijit.byId('dynamicgridCWPROCESS')){
var selctedItem = dijit.byId('dynamicgridCWPROCESS').selection.getSelected();
if(selctedItem.length){
dojo.forEach(selctedItem, function(selectedItem){
if(selectedItem !== null){
dojo.forEach(dijit.byId('dynamicgridCWPROCESS').store.getAttributes(selectedItem), function(attribute){
var value = dijit.byId('dynamicgridCWPROCESS').store.getValues(selectedItem, attribute);
//alert(value);
if(attribute == "PROCESS_ID"){
whereCondn = whereCondn+attribute+"="+value;
}
//alert("new alert"+whereCondn);
window.location.href = "modify.jsp?DETAIL="+whereCondn;
});
}
});
//alert("grid row selected");
}else{
alert("grid row not selected");
}
}
if(gbshowgridFlag==false){
alert("grid not loaded");
}
}