Jump to content

BobbyRachel

Members
  • Posts

    4
  • Joined

  • Last visited

BobbyRachel's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I have a main window named worklistManager.jsp. worklistManager.jsp has a pop up window named processManager.jsp. Again, processManager.jsp has another pop up window, named eventLog.jsp. Once again eventLog.jsp has a pop up window named eventUsers.jsp. eventUsers.jsp has a dojox/grid/DataGrid and a button. After selecting a particular row in the grid, then clicking the button, it has to place the value into the textbox of eventLog.jsp after closing eventUsers.jsp. So far, I have tried the script below to accomplish this, but it's not working as I hoped. <script type="text/javascript"> function getEventLogUserSelect(){ if(dijit.byId('dynamiceventusergridCWUSER')){ var selctedItem = dijit.byId('dynamiceventusergridCWUSER').selection.getSelected(); if(selctedItem.length){ dojo.forEach(selctedItem, function(selectedItem){ if(selectedItem !== null){ dojo.forEach(dijit.byId('dynamiceventusergridCWUSER').store.getAttributes(selectedItem), function(attribute){ var value = dijit.byId('dynamiceventusergridCWUSER').store.getValues(selectedItem, attribute); if(attribute == "USERID"){ window.opener.SetValue(value); window.close(); } }); } }); //alert("grid row selected"); }else{ alert("grid row not selected"); } } if(gbshowgridFlag==false){ alert("grid not loaded"); } } function SetValue(val){ var txt = document.getElementById('CWPROCESSEVENTLOG.USER_ID'); txt.value = val; } </script>
  2. 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"); }}
  3. i got the answer.... <script type="text/javascript"> function update(){ var datefield = document.getElementById("myTextBox_CWPWORKLIST.DUE_DATE").value; alert(datefield);var columnname = dateFormat(datefield, "dd-mm-yy");alert(columnname); } </script>
  4. i have a javascript variable which holds date time value... i need only date from it... <script type="text/javascript"> function update(){ var datefield = document.getElementById("myTextBox_CWPWORKLIST.DUE_DATE").value; alert(datefield); } </script> here the datefield = 2013-02-21 00:00:00.0... i need datefield = 2013-02-21.. how to get this..
×
×
  • Create New...