• Post Reply Bookmark Topic Watch Topic
  • New Topic

can't support at chrome but can support at IE

 
Sharon Wong
Ranch Hand
Posts: 35
IBM DB2 Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friend,

please kindly advise my code can't support at Chrome, but can support at IE.
it can update and checked item i need and link to servlet at IE but can't make it at chrome. After checked the data and update, my screen can't update my checked. why?
my screen is a link. after click the link then will be reach this screen. After i debug, it can't link to servlet code.

this is my jsp coding.
<!--
$Revision: 1.3 $
$Author: joanna $
$Date: 2013/03/20 07:08:19 $
$RCSFile $
$Locker: $
$Source: /usr/local/cvsroot/MIB_EO5/WebContent/jsp/OmnibusAcctTableView.jsp,v $
-->
<%
response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setDateHeader("Expires", 0); //prevents caching
response.setHeader("Cache-Control", "no-store"); //HTTP 1.1
%>

<%@ include file="Properties.jsp" %>
<%//@ page session="false" %>
<%@ page import = "java.util.*,com.ait.util.*" %>
<jsp:useBean id="pageInfo" class="com.ait.beans.PageBean" scope="request"/>
<%@ page import="com.ait.beans.AcForBrkBean"%>
<jsp:useBean id="omniBean" class="com.ait.beans.AcMastBean" scope="request"/>
<%@ page import="com.ait.beans.AcMastExtBean"%>
<%
String theme = session.getAttribute("theme")== null ? defThemeColour : (String) session.getAttribute("theme");

Hashtable SelectedRecordHt = (java.util.Hashtable)session.getAttribute("SelectedRecordHt");
if(SelectedRecordHt==null) SelectedRecordHt = new java.util.Hashtable();
String acctNo1=omniBean.getCompanyId().trim()+"-"+omniBean.getBranchId().trim()+"-"+omniBean.getEafID().trim()+"-"+omniBean.getAcctNo().trim()+"-"+omniBean.getAcctSbNo().trim();
String mode =request.getParameter("mode");
%>

<html>
<link rel="stylesheet" href="../theme/<%=theme %>/master.css">
<head>
<title>OutBound Foreign Broker Tagging</title>
</head>
<script language="JavaScript" src="../jscripts/common/misc.js"></script>
<script language="JavaScript">
history.forward();

function fnKeep() //Add mode tagging - add by JNC
{
var cnt = getChecked();
if (cnt>0){
document.foUsrPrf.subcmd.value = "keep_omniAcct";
document.foUsrPrf.submit();
window.opener.p_item2[0].checked = true;
window.opener.p_item2[1].checked = false;
window.close();
}
else {
if (confirm('No tag to omnibus')){

window.opener.p_item2[0].checked = false;
window.opener.p_item2[1].checked = true;
window.close();
}
else{
window.focus();
}
}
}

function fnUpdate()
{
var cnt = getChecked();
if (cnt>0){
alert(cnt);
document.foUsrPrf.subcmd.value = "update_omniAcct";
document.foUsrPrf.submit();
window.opener.p_item2[0].checked = true;
window.opener.p_item2[1].checked = false;
window.close();
}
else {
if (confirm('No tag to omnibus')){
document.foUsrPrf.subcmd.value = "update_omniAcct";
document.foUsrPrf.submit();
window.opener.p_item2[0].checked = false;
window.opener.p_item2[1].checked = true;
window.close();
}
else{
window.focus();
}
}
}

function fnCancel()
{
var cnt = getChecked();
if (cnt>0){
window.opener.p_item2[0].checked = true;
window.opener.p_item2[1].checked = false;
window.close();
}
else {
if (confirm('No tag to omnibus')){
window.opener.p_item2[0].checked = false;
window.opener.p_item2[1].checked = true;
window.close();
}
else{
window.focus();
}
}
}

function fnControlPage(frm, command) {

var subcmd_value = "controlPage";

if (command == "PREVPAGE") {
frm.fmDirection.value = -1;
} else if (command == "NEXTPAGE") {
frm.fmDirection.value = 1;
}
frm.subcmd.value = subcmd_value;
frm.submit();
}

function SingleSelect(no, obj)
{

if (eval(obj[no])!=null){
if (eval(obj[no].checked)== true) {
for (var i = 0; i <obj.length; i++)
{
obj[i].checked= false;
if (i == no)
{ obj[i].checked = true; }
}
}}
}
</script>

<script>
function checkAll(foUsrPrf) {
for (var i=0;i<document.foUsrPrf.elements.length;i++) {
var e = document.foUsrPrf.elements[i];

if (e.name != 'allbox' && e.name != 'grpProfile')
e.checked = document.foUsrPrf.allbox.checked;
}
}

function getChecked() {
var arrKey = new Array ();
var cnt = 0;
var j = 0;


for (var i=0;i<document.foUsrPrf.elements.length;i++) {
var e = document.foUsrPrf.elements[i];

if (e.name.length >7)
{
if (e.name.substring(0,7)=="fmCheck"){

if (e.checked){
arrKey[j]=e.value;
j++;
cnt++;
}
}
}
}
document.foUsrPrf.selKey.value = arrKey.join (',');
alert(arrKey);
return cnt;
}

function checkSelection(obj){


}
</script>

<body bgcolor=#FFFFFF >

<table width="100%">
<tr>
<td><div class="title"><div class="title_l"><div class="title_r">
<div class="rc_content"> OUTBOUND FOREIGN BROKER TAGGING</div>
</div></div></div></td>
</tr>
<tr align="center">
<td colspan="5"><font color="red"><%= omniBean.getTopErrMsg() %></font></td>
</tr>
</table>

<center>
<form name="foUsrPrf" method="post" action="EOCentral">
<input type="hidden" name="cmd" value="MaintainAcMktInfCommand">
<input type="hidden" name="subcmd" value="">
<input type="hidden" name="token" value="<%=request.getAttribute("token")%>">
<input type="hidden" name="fmPrevPage" value="<%=pageInfo.isPrevPage()%>">
<input type="hidden" name="fmNextPage" value="<%=pageInfo.isNextPage()%>">
<input type="hidden" name="fmPageNo" value="<%=pageInfo.getPageNo()%>">
<input type="hidden" name="fmRecPerPage" value="<%=pageInfo.getRecordPerPage()%>">
<input type="hidden" name="fmDirection" value="">
<input type="hidden" name="insertPage" value="editPage">
<input type="hidden" name="acctNo1" value="<%=acctNo1 %>">
<input type="hidden" name="selKey">


<table width="100%" align="left">

<tr>
<td colspan="2">
<table border="0" cellspacing="2" cellpadding="3" width="100%" align="center">
<tr class="head" align="center">
<td nowrap> Account No</td>
<td nowrap> Account Full Name</td>

<td nowrap> Omnibus Account</td>
</tr>
<%
Vector vctList = null;
Vector vctSelList = null;
if(session.getAttribute("omniAcctTeam") !=null )
{
vctList = (Vector)session.getAttribute("omniAcctTeam");
}
if(session.getAttribute("omniSelAcctTeam") !=null )
{
vctSelList = (Vector)session.getAttribute("omniSelAcctTeam");
}
if(vctList == null)
{%>
<tr>
<td colspan="3" class="msg1" align="center" width="46%">No Record</td>
</tr>
<%}
else
{
Iterator iter = vctList.iterator();

int i = 0;
while(iter.hasNext())
{
boolean isThr=false;
AcMastExtBean bean = (AcMastExtBean)iter.next();
String acct= bean.getCompanyId().trim()+"-"+bean.getBranchId().trim()+"-"+bean.getEafId().trim()+"-"+bean.getAcctNo().trim()+"-"+bean.getAcctSbNo().trim();

Iterator iter2 = vctSelList.iterator();
String selOmni = "";
while(iter2.hasNext()){
AcForBrkBean tempBean = (AcForBrkBean)iter2.next();
if(tempBean.getFbAcctNo().trim().equals(bean.getAcctNo().trim())){
selOmni = FormUtil.padR(tempBean.getFBrkOmn(),10)+ "-" + tempBean.getFBrkOmnSb().trim();
}
}

String key3="";
if (!bean.getExtRefNo3().trim().equals("")){
key3 = acct;
}

%>
<tr class="<%=(i % 2 == 0?"row1":"row2")%>">
<td nowrap align="center"><%= bean.getAcctNo() %></td>
<td nowrap align="center"><%= bean.getAcctFName() %></td>
<% int j = 0; %>
<td nowrap align="left"><table>
<%

if(bean.getvTable() == null)
{%>
<tr>
<td > </td>
</tr>
<%}
else
{
Vector accList = bean.getvTable();

for(int count=0;count<accList.size();count++){

String OmniSb = FormUtil.padR(accList.get(count).toString(),10)+ "-" + bean.getAcctSbNo2().trim();
%>
<tr><td><input type="checkbox" name="fmCheck<%=i%>" value="<%=key3+'-'+accList.get(count)+'-'+bean.getAcctSbNo2()%>" <%=selOmni.equals(OmniSb)?"checked":"" %> onclick= "javascript:SingleSelect(<%=j%>, foUsrPrf.fmCheck<%=i%>)" ></td><td><%= accList.get(count) %>-<%= bean.getAcctSbNo2() %></td></tr>
<% ++j;}

} %>

</table></td>
</tr>
<%
i++;
}
}%>

<tr>
<td colspan="4" align="right">
<% if (pageInfo.isPrevPage() == true) { %>
<a href="#" onClick="javascript:fnControlPage(document.foUsrPrf, 'PREVPAGE')">Prev</a>
<% } %>
 
<% if (pageInfo.isNextPage() == true) { %>
<a href="#" onClick="javascript:fnControlPage(document.foUsrPrf, 'NEXTPAGE')">Next</a>
<% } %>
 
</td>
</tr>
</table>

<input type="hidden" name="tagAppLimit" value="">
</td>
</tr>
<tr>
<td align="center">
<%if (mode.equals("add")) { %>
<input type=button value=" Update " onClick="javascript:fnKeep()" name="btKeep">
<% } else{ %>
<input type=button value=" Update " onClick="javascript:fnUpdate()" name="button">
<% } %>
<input type=button value=" Cancel " onClick="javascript:fnCancel()" name="btCancel">
<%=mode %>
</td>
</tr>
</table>
</form>
</center>
</body>
</html>



java:
public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException {

String subcmd = req.getParameter("subcmd");
String next = "jsp/CommandNotFound.jsp";
String error = "jsp/error.jsp";
//HttpSession session = req.getSession(false);
try {
if (subcmd.equals("update_omniAcct")){
next = updateOutbondFrgBroker(req, "jsp/OmnibusAcctTableView.jsp", "jsp/OmnibusAcctTableView.jsp");
}else if (subcmd.equals("keep_omniAcct")){
keepOutbondFrgBrokerTagging(req);
}
else {
logWriter.log("Invalid sub command", LogWriter.DEBUG);
throw new CommandException("Invalid Command");
}
}
catch (CommandException e){
logWriter.log("Cannot get subcmd : "+subcmd, LogWriter.ERROR);
logWriter.log("CommandException caught : "+e.getMessage(), LogWriter.ERROR);
next = error;
}

servlet:
public String updateOutbondFrgBroker(HttpServletRequest req, String nextPage, String prevPage){

logWriter.log("START updateOutbondFrgBroker", LogWriter.DEBUG);

String next = nextPage;
AcMastBean bean = new AcMastBean();
try {
HttpSession session = req.getSession(false);
AcMktInfDA acDA = new AcMktInfDA();
AcMastDA acmast = new AcMastDA();
boolean acForBrk = true;
Vector accountNo = new Vector();
String defCompany = (String)session.getAttribute("defCompany");
String defBranch = (String)session.getAttribute("defBranch");
String defEaf = (String)session.getAttribute("defEaf");
String userId = (String)session.getAttribute("userID");

String acctNo1 = FormUtil.returnString(req.getParameter("acctNo1"));
Vector orgSelAcctTeam = (Vector)session.getAttribute("omniSelAcctTeam");
AcForBrkBean[] acSelBean = new AcForBrkBean[0];

if (!(acctNo1.equals(""))){
accountNo = FormUtil.breakAccountNo(acctNo1, defCompany, defBranch, defEaf);

bean.setCompanyId(accountNo.elementAt(0).toString());
bean.setBranchId(accountNo.elementAt(1).toString());
bean.setEafID(accountNo.elementAt(2).toString());
bean.setAcctNo(accountNo.elementAt(3).toString());
bean.setAcctSbNo(accountNo.elementAt(4).toString());
}

String selKeys[] = req.getParameterValues("selKey");
if (!selKeys[0].isEmpty()){
String checkKeys[] =selKeys[0].split(",");
String[] temp={"","","","","","","",""};
Vector vect = new Vector();
if(checkKeys !=null){

Iterator iter = orgSelAcctTeam.iterator();
int i = 0;
AcForBrkBean tempDelBean = new AcForBrkBean();
while(iter.hasNext())
{
boolean match=false;
tempDelBean = (AcForBrkBean)iter.next();
for(int k=0;k<checkKeys.length;k++){
temp=checkKeys[k].split("-");
if (tempDelBean.getFbAcctNo().equals(temp[3].trim()) && tempDelBean.getFbAcctSbNo().equals(temp[4].trim()) && tempDelBean.getFBrkOmn().equals(temp[5].trim()) && tempDelBean.getFBrkOmnSb().equals(temp[6].trim()) ){

match = true;
}
if(!match){
tempDelBean.setCompanyId(bean.getCompanyId());
tempDelBean.setBranchId(bean.getBranchId());
tempDelBean.setEafID(bean.getEafID());
tempDelBean.setAcctNo(bean.getAcctNo());
tempDelBean.setAcctSbNo(bean.getAcctSbNo());
tempDelBean.setRcdStat("D");
vect.add(tempDelBean);
}

}

}

for(int k=0;k<checkKeys.length;k++){
temp=checkKeys[k].split("-");

if(temp!=null){

AcForBrkBean tempAcBean =new AcForBrkBean();
tempAcBean.setFbCompanyId(temp[0]);
tempAcBean.setFbBranchId(temp[1]);
tempAcBean.setFbEafID(temp[2]);
tempAcBean.setFbAcctNo(temp[3]);
tempAcBean.setFbAcctSbNo(temp[4]);
//tempAcBean.setAcctFName(temp[5]);
if(temp[5]!=null){
tempAcBean.setFBrkOmn(temp[5]);
tempAcBean.setFBrkOmnSb(temp[6]);
}else{
tempAcBean.setFBrkOmn("");
}
tempAcBean.setCompanyId(bean.getCompanyId());
tempAcBean.setBranchId(bean.getBranchId());
tempAcBean.setEafID(bean.getEafID());
tempAcBean.setAcctNo(bean.getAcctNo());
tempAcBean.setAcctSbNo(bean.getAcctSbNo());

vect.add(tempAcBean);

}
}

}
acSelBean = (AcForBrkBean[]) vect.toArray(new AcForBrkBean[0]);

}
boolean upd= false;
int count=0;
if(acSelBean.length!=0){
//count=acDA.updateAcForBrk(acSelBean,bean);
count=updateTaggedAcForBrk(acSelBean);
upd=acDA.updateAcMastExtOutBound("Y", bean);
}else{
count=acDA.deleteAcForBrk(bean);
upd=acDA.updateAcMastExtOutBound("N", bean);
}

if(!upd){
bean.setTopErrMsg("Update Failed.");
}


} catch (DAException e) {
logWriter.log("updateOutbondFrgBroker DAException : "+e.getMessage(),LogWriter.ERROR);
}catch (Exception e) {
logWriter.log("updateOutbondFrgBroker Exception : "+e.getMessage(),LogWriter.ERROR);
}
req.setAttribute("omniBean", bean);
return next;
}

my css is:
body {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; color: #000000;
scrollbar-arrow-color: #4F4F82;
scrollbar-3dlight-color: #4F4F82;
scrollbar-darkshadow-color: #4F4F82;
scrollbar-face-color: #f4f4f0;
scrollbar-highlight-color: #FFFFFF;
scrollbar-shadow-color: #d0d0d0;
scrollbar-track-color: #ffffff;
}

p {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt}

td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt}

input {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt}

select {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt}


a:link {color: #0000CC;}

a:visited {color: #0000CC}

a:active {color: #990000}

a:hover {color: #990000; text-decoration: none}


a.link1:link {color: #003366; text-decoration: none ; font-size: 8pt; font-family: Arial, Helvetica, sans-serif}

a.link1:visited {color: #003366; text-decoration: none ; font-size: 8pt; font-family: Arial, Helvetica, sans-serif}
a.link1:active {color: #003366; text-decoration: none ; font-size: 8pt; font-family: Arial, Helvetica, sans-serif}
a.link1:hover {color: #990000; text-decoration: underline; font-size: 8pt; font-family: Arial, Helvetica, sans-serif}

/*.title {color: #FFFFFF; font-weight: bold;
background: url("../images/imagesv3/mainframe/title_black.gif") repeat-x 0 0;}

.main {color: #FFFFFF; font-weight: bold; background: url("../images/imagesv3/mainframe/title_black.gif") repeat-x 0 0;}*/

.head {color: #FFFFFF; background-color: #66aa77; font-weight: bold}

.title_l {background:transparent url("../images/imagesv5/green/grey_l.gif") no-repeat; height: 25px}
.title_r {background:transparent url("../images/imagesv5/green/grey_r.gif") no-repeat right; height: 25px}
.title {background:transparent url("../images/imagesv5/green/greybar.gif") repeat-x ; color: #FFFFFF; font-weight: bold;}

.main_l {background:transparent url("../images/imagesv5/green/green_l.gif") no-repeat; height: 25px}
.main_r {background:transparent url("../images/imagesv5/green/green_r.gif") no-repeat right; height: 25px}
.main {background:transparent url("../images/imagesv5/green/greenbar_m.gif") repeat-x ; color: #FFFFFF; font-weight: bold;}
.rc_content { margin-left: 20px; margin-top: 5px; width: 98.9%; color: white; font: bold;}

.row2 {background-color: #dff1ff}

.row1 {background-color: #ffffff}

.row3 {background-color: #D4FFAA}

.row4 {background-color: #D4FF55}

.caps {text-transform: uppercase}

.small {font-size: 8pt}

.tiny {font-size: 7pt; text-align:left; width: 13%}

.tab { background-color: #999999; color: #FFFFFF; font-size: 8pt}

.msg1 {color: #FF0000; font-weight: bold; font-size: 8pt}
.title1 { font-weight: bold; color: #FFFFFF; background: url("../images/imagesv3/mainframe/title_black.gif") repeat-x 0 0;}

.title2 { background: url("../images/imagesv3/mainframe/title_black.gif") repeat-x 0 0;; color: #FFFFFF; font-weight: bold}

.head1 { font-weight: bold; color: #FFFFFF; background-color: #0099ff}

.main2 {color: #FFFFFF; font-weight: bold; background: url("../images/imagesv3/mainframe/title_lightblue.gif") repeat-x 0 0;}

/* EOV5 - Home page style */
.gen_rc_top div {background: url(../images/imagesv5/green/whitews_tl.gif) no-repeat top left;}
.gen_rc_top {background: transparent url(../images/imagesv5/green/whitews_tr.gif) no-repeat top right;}
.gen_rc_bottom div {background: transparent url(../images/imagesv5/green/whitews_bl.gif) no-repeat bottom left;}
.gen_rc_bottom {background: transparent url(../images/imagesv5/green/whitews_br.gif) no-repeat bottom right;}
.gen_rc_top div, .gen_rc_top,.gen_rc_bottom div, .gen_rc_bottom {height: 20px;font-size: 1px;}
.gen_rc_content { margin: 0 30px; height: 100% }

.gen_t {background: url(../images/imagesv5/green/whitews_lt.gif) 100% 0 repeat-x;}
.gen_b {background: url(../images/imagesv5/green/whitews_lb.gif) 0 100% repeat-x;}
.gen_l {background: url(../images/imagesv5/green/whitews_ll.gif) 0 0 repeat-y;}
.gen_r {background: url(../images/imagesv5/green/whitews_lr.gif) 100% 0 repeat-y;}

.gen_text {color: #FFFFFF; text-decoration: none; font-weight: bold;}

.gent_rc_box {background: url(../images/imagesv5/green/greenbar.gif) 0 9px repeat-x;}
.gent_rc_content {margin-left:20px; margin-top: -10px; height: 20px;}
.gent_rc_top div {background: url(../images/imagesv5/green/greenws_tl.gif) no-repeat top left;}
.gent_rc_top {background: transparent url(../images/imagesv5/green/greenws_tr.gif) no-repeat top right;}
.gent_rc_top div, .gent_rc_top {height: 20px;font-size: 1px;}

.gent_t {background: url(../images/imagesv5/green/greenws_lt.gif) 100% 0 repeat-x;}

.sprt_rc_box {background: url(../images/imagesv5/green/greybar_thick.gif) 0 7px repeat-x;}
.sprt_rc_bottom div, .sprt_rc_bottom {height: 20px;font-size: 1px;}
.sprt_rc_bottom div {background: url(../images/imagesv5/green/greyws_bl.gif) no-repeat bottom left;}
.sprt_rc_bottom {background: transparent url(../images/imagesv5/green/greyws_br.gif) no-repeat bottom right;}

.sprt_b {background: url(../images/imagesv5/green/greyws_lb.gif) 0 100% repeat-x;}
.sprt_l{background: url(../images/imagesv5/green/greyws_ll.gif) 0 0 repeat-y;}
.sprt_r {background: url(../images/imagesv5/green/greyws_lr.gif) 100% 0 repeat-y;}

.alert_l {background:transparent url("../images/imagesv5/red_alert.gif") no-repeat; height: 52px }
.alert_r {background:transparent url("../images/imagesv5/red_r.gif") no-repeat right; height: 52px; margin-top: -2px }
.alert {background:transparent url("../images/imagesv5/redbarws.gif") repeat-x ; height: 52px }
.alert_content { margin-left:20px; margin-top: 5px }


Thank you very much.

Regards
Sharon
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!