BobbyRachel Posted January 25, 2013 Share Posted January 25, 2013 I have a jsp page(worklist.jsp) with button.. in button on click, am calling a function(getModify()), which is inside utility.js file.. after performing some actions in that function, am redirecting some values to next jsp page(modify.jsp) using winow.location.href.... in button on click, it has to call the function which i inside js file and open the page(modify.jsp) as popup window... how to get this... worklist.jsp page: <%@ 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 page: 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"); }} Link to comment Share on other sites More sharing options...
justsomeguy Posted January 28, 2013 Share Posted January 28, 2013 You can use window.open to open a new window, check online documentation for the options. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now