473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

window.onunload does not work in IE6

hi all,

i am using window.onunload() method in IE6, it works fines in local, but it does not work in Integration Box(Linux Environment), i have written a simple alert() statement to check whether it does really trigger that event alert() statement is also not working it seems event it self is not triggering. But it works fine in IE7 and FireFox.

here is my code snippet:
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. window.onunload = confirmExit;
  3.  
  4. function confirmExit(){
  5.             if( !flag ){
  6.                 window.opener.location.href = "<%= request.getContextPath() %>"+"/postHome.do";
  7.             }
  8.         }
  9. </script>
  10.  
what should i need to do in order to work.
do we need to set any extra attributes :(
Any help deeply appreciated,

its very urgent.


thanks,
Rakesh.
Nov 20 '07 #1
13 8574
acoder
16,027 Expert Mod 8TB
onunload should work in IE6 as far as I'm aware.

Where do set the flag variable?

Have you tried onbeforeunload instead?
Nov 20 '07 #2
onunload should work in IE6 as far as I'm aware.

Where do set the flag variable?

Have you tried onbeforeunload instead?
Thanks for Quick Reply

i am using flash content in my jsp onbeforeunload is getting fired when my flash is loading why i havent understood that.

how can i use onunload, what are the possible causes for getting not executed.

urgent :(

thanks,
rakesh.
Nov 21 '07 #3
acoder
16,027 Expert Mod 8TB
Post the onbeforeunload code.
Nov 21 '07 #4
Post the onbeforeunload code.
i have used the same code for onbeforeunload which i have used for onunload
Nov 21 '07 #5
acoder
16,027 Expert Mod 8TB
Check that window.opener still refers to the parent.

Also, is the value of flag false?
Nov 21 '07 #6
Check that window.opener still refers to the parent.

Also, is the value of flag false?

var flag = false;

Yes the Value of Flag is set to false initially and based on condition we are setting that as true.

Even when i kept simple alert statement it is not working.
I suppose the event is not getting triggered.

pls suggest.

thanks,
Rakesh.
Nov 26 '07 #7
acoder
16,027 Expert Mod 8TB
Does this example work in IE6?
Nov 26 '07 #8
Does this example work in IE6?

Since it is a straight forward example it is working fine.. in IE6, in local for me it is working but when it goes to Linux Environment it is failing.

My Script is placed in Head tags only... does it have any effect... where we need to define such kind of scripts....

i repeat it is not at all calling onunload function also...
since i have tested it by keeping simple alert statement in it, but it is not working for me.

Any Suggestion greatly appreciated.

Rakesh
Nov 26 '07 #9
acoder
16,027 Expert Mod 8TB
So even the W3Schools example is not working?

You have IE6 on Linux?!
Nov 26 '07 #10
So even the W3Schools example is not working?

You have IE6 on Linux?!
Ya, we have our application deployed there and we are accessing that from our system.


Rakesh
Nov 26 '07 #11
acoder
16,027 Expert Mod 8TB
Can you post the whole page code to test?
Nov 26 '07 #12
Can you post the whole page code to test?
please find the code which i am using.

[HTML]<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>

<%@ page import="com.gtech.esi.core.system.util.GlobalAppli cationObject" %>
<%@ page import="com.gtech.esi.core.system.Global" %>
<%@ page import="com.gtech.esi.core.system.notification.Not ification" %>
<%@ page import="com.gtech.esi.core.gui.player.game.instant .form.ShowGameDetailForm" %>
<%@ page import="com.gtech.esi.core.gui.player.uam.PlayerBe an" %>
<%@ page import="org.apache.struts.Globals" %>
<%@ page import="java.text.NumberFormat"%>
<%@ page import="java.util.Locale"%>

<%@ page import="java.text.DecimalFormat"%>
<%@ page import="java.text.DecimalFormatSymbols" %>

<head>
<title>LOTERIE NATIONALE LUXEMBOURG</title>
<link rel = "stylesheet" href = "<%= request.getContextPath() %>/lottery/CSS/general.css" type = "text/css">
<link rel = "stylesheet" href = "<%= request.getContextPath() %>/lottery/CSS/loterie.css" type = "text/css">
<link rel = "stylesheet" href = "<%= request.getContextPath() %>/lottery/CSS/rubbel.css" type = "text/css">
<link rel = "stylesheet" href = "<%= request.getContextPath() %>/lottery/CSS/interactive.css" type = "text/css">
<link rel = "stylesheet" href = "<%= request.getContextPath() %>/styles/style.css" type = "text/css">
<script type = "text/javascript" src = "<%= request.getContextPath() %>/lottery/js/menu.js"></script>
<script type = "text/javascript" src = "<%= request.getContextPath() %>/lottery/js/tools.js"></script>
<script type = "text/javascript" src = "<%= request.getContextPath() %>/lottery/js/xml.js"></script>
<script src="<%= request.getContextPath() %>/lottery/js/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="<%= request.getContextPath() %>/lottery/js/AC_ActiveX.js" type="text/javascript"></script>

[/HTML]
Expand|Select|Wrap|Line Numbers
  1.         <script type="text/javascript">
  2.             //nsingh Added for capturing cross browser backspace button
  3.     document.onkeydown = function(e) {handleKeys(e)}
  4.     document.onkeypress = function(e) {handleKeys(e)}
  5.     function handleKeys(e) { 
  6.         if(e)        
  7.         {
  8.         if (e.stopPropagation) {
  9.             e.stopPropagation();
  10.             e.preventDefault();
  11.             }
  12.         } else{
  13.     window.event.cancelBubble = true;       //IE reports window.event not arg 
  14.     window.event.returnValue = false;       //IE reports window.event not arg 
  15.  
  16.         }
  17.     }
  18.             if (document.images)
  19.                 {
  20.                     img1 = new Image();
  21.                     img2 = new Image();
  22.                     img3 = new Image();
  23.                     img4 = new Image();
  24.                     img5 = new Image();
  25.                     img1.src = "<%= request.getContextPath() %>/images/logo.gif";
  26.                     img2.src = "<%= request.getContextPath() %>/images/btn_select_demo.gif" ;
  27.                     img3.src = "<%= request.getContextPath() %>/images/btn_autrex_jue.gif" ;
  28.                     img4.src = "<%= request.getContextPath() %>/images/btn_transfer.gif" ;
  29.                     img5.src = "<%= request.getContextPath() %>/images/white_point.gif" ;
  30.                 }
  31.         </script>
  32.  

[HTML]<meta http-equiv="pragma" content="no-cache">
<meta http-equiv = "Expires" content = "-1">

<style>
.bgcol{background-color: #6DB344;}

li.submenu {
background-color:#6DB344;
background-image:none;
text-align:left;
line-height:20px;
border-top-width:1px;
}
ul.submenu {
background-color:#6DB344;
background-image:none;
text-align:left;
line-height:20px;
border-top-width:1px;
}
</style>

<script>
[/HTML]
Expand|Select|Wrap|Line Numbers
  1.     if (navigator.userAgent.indexOf("MSIE") >= 0)
  2.         {
  3.             document.writeln("<style> .menulist li.cat { border-top: 1px solid #3f7437; } </style>");
  4.         }else if (navigator.userAgent.indexOf("Firefox") >= 0)
  5.         {
  6.             document.writeln("<style> .menulist li.cat { border:1px solid #3f7437; border-left-width: 0px;} </style>");
  7.             document.writeln("<style> #dropdown li.cat { border-top:1px solid #3f7437;} </style>");
  8.         }
  9.         else{
  10.             document.writeln("<style> .menulist li.cat { border-top: 1px solid #3f7437; } </style>");                
  11.         }
  12. </script>
  13.  
  14. <script>
  15.     if (navigator.userAgent.indexOf("MSIE") >= 0)
  16.         {
  17.             document.writeln("<style> .fontprice { float:right;    } </style>");
  18.         }else if (navigator.userAgent.indexOf("Firefox") >= 0)
  19.         {
  20.             document.writeln("<style> .fontprice { margin-top:-20px; } </style>");
  21.         }
  22.         else{
  23.             document.writeln("<style> .fontprice { margin-top:-20px; } </style>");                
  24.         }
  25. </script>
  26.  
  27. <script>
  28.     if (navigator.userAgent.indexOf("MSIE") >= 0)
  29.         {
  30.             document.writeln("<style> .gameStyle { float:left; } </style>");
  31.         }else if (navigator.userAgent.indexOf("Firefox") >= 0)
  32.         {
  33.             document.writeln("<style> .gameStyle { margin-left:0px; } </style>");
  34.         }else if (navigator.userAgent.indexOf("Opera") >= 0)
  35.         {
  36.             document.writeln("<style> .gameStyle { margin-left:-50px; } </style>");
  37.         }
  38.         else{
  39.             document.writeln("<style> .gameStyle { margin-left:-70px; } </style>");                
  40.         }
  41. </script>
  42.  
  43. <script type="text/javascript" >
  44.  
  45. function displayTicketNumber(ticketNumber){
  46.     if(ticketNumber){
  47.         document.getElementById("ticketNumberId").innerHTML = ticketNumber;
  48.         document.getElementById("ticketNumberId").style.visibility="visible";
  49.     }
  50. }
  51.  
  52. function doNotDisplayTktNumber(){
  53.   if( document.getElementById("ticketNumberId")){
  54.     document.getElementById("ticketNumberId").style.visibility="hidden";
  55.     }
  56. }
  57.  
  58. function displayWalletBalance(ticketNumber,walletBalance){
  59.     if( document.getElementById("walletBalanceId") ){
  60.         document.getElementById("walletBalanceId").innerHTML = walletBalance;
  61.         document.getElementById("walletBalanceId").style.visibility="visible";
  62.         document.getElementById("walletBalanceId").style.width="";
  63.         document.getElementById("walletBalanceId").style.height="";
  64.     }
  65.     window.opener.parent.globalPopupCtr = new Date().getTime();
  66.     if( document.getElementById("ticketNumberId") ){
  67.         document.getElementById("ticketNumberId").innerHTML = '<bean:message key="PlayGame.playInstGame.ticketNumber"/>'+'<b>'+ticketNumber+'</b>';
  68.         document.getElementById("ticketNumberId").style.visibility="visible";
  69.     }
  70. }
  71.  
  72. function hideAll() {
  73.     if( document.getElementById("walletBalanceId") )
  74.         document.getElementById("walletBalanceId").style.visibility="hidden";
  75.     if( document.getElementById("transferFunds") )
  76.         document.getElementById("transferFunds").style.visibility = 'hidden';
  77.     if( document.getElementById("walletBalance") )
  78.         document.getElementById("walletBalance").style.visibility = 'hidden';
  79.     if( document.getElementById("reglementOfficiel") )
  80.         document.getElementById("reglementOfficiel").style.visibility = 'hidden';
  81.     if( document.getElementById("dropDownId") )
  82.         document.getElementById("dropDownId").style.visibility = 'hidden';
  83. }
  84.  
  85. function showAll() {
  86.  
  87.     if( document.getElementById("walletBalanceId") )
  88.         document.getElementById("walletBalanceId").style.visibility="visible";
  89.     if( document.getElementById("transferFunds") )
  90.         document.getElementById("transferFunds").style.visibility = 'visible';
  91.     if( document.getElementById("walletBalance") )
  92.         document.getElementById("walletBalance").style.visibility = 'visible';
  93.     if( document.getElementById("reglementOfficiel") )
  94.         document.getElementById("reglementOfficiel").style.visibility = 'visible';
  95.     if( document.getElementById("dropDownId") )
  96.         document.getElementById("dropDownId").style.visibility = 'visible';
  97.  
  98.      listMenu.activateMenu("listMenuRoot", arrow);
  99.  
  100. }
  101.  
  102. //Added by nsingh
  103.  
  104.         var flag = false;
  105.  
  106.         document.oncontextmenu=new Function("return false");
  107.  
  108.         function rightClick(e) {
  109.             if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
  110.                 return false;
  111.             else if (navigator.appName == 'Microsoft Internet Explorer' && 
  112.                         (event.button == 2 || event.button == 3)) 
  113.             {
  114.                 return false;
  115.             }
  116.             return true;
  117.         }
  118.  
  119.         document.onmousedown=rightClick;
  120.         document.onmouseup=rightClick;
  121.  
  122.         if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  123.         if (document.layers) window.captureEvents(Event.MOUSEUP);
  124.  
  125.         window.onmousedown=rightClick;
  126.         window.onmouseup=rightClick;
  127.         window.onunload = confirmExit;
  128.         //document.onmousedown = shiftEnter;
  129.  
  130.  
  131.  
  132.         function shiftEnter(e) {
  133.             if (event.shiftKey) {
  134.               var msg = "<bean:message key='home.player.operationNotAllowed' />";
  135.               alert(msg);
  136.               return false;
  137.             }
  138.         }
  139.  
  140.         function setValue(){
  141.             flag = true;
  142.         }
  143.  
  144.     function confirmExit(){
  145.             <% 
  146.             if(null!=request.getParameter( "type" )    )
  147.             if(request.getParameter( "type" ).equals("wager")) { %>
  148.                 if( !flag ){
  149.                 window.opener.location.href = "<%= request.getContextPath() %>"+"/postHome.do";
  150.             }
  151.             <%}%>
  152.         }    
  153. //Added by nsingh
  154.  
  155. function activateFlash(obj){
  156.     objects = document.getElementsByTagName(obj);
  157.     for (var i = 0; i < objects.length; i++){
  158.         objects[i].outerHTML = objects[i].outerHTML;
  159.     }
  160. }
  161.  
  162. </script>
  163.  
  164. <script type="text/javascript">
  165.     function ShowMenu() {
  166.         if (document.getElementById('frame1'))
  167.         document.getElementById("frame1").style.display = "inline"; 
  168.     }
  169.     function HideMenu() {
  170.         if (document.getElementById('frame1'))
  171.         document.getElementById("frame1").style.display = "none"; 
  172.     }
  173.     function ShowMenu2() {
  174.             if (document.getElementById('frame2'))
  175.             document.getElementById("frame2").style.display = "inline"; 
  176.         }
  177.     function HideMenu2() {
  178.             if (document.getElementById('frame2'))
  179.             document.getElementById("frame2").style.display = "none"; 
  180.     }
  181. </script>
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function childWindowClose(contextPath){
  3.     //alert("window.opener.location :" + window.opener.location);
  4.     flag = true;
  5.     window.opener.location.href = contextPath+"/gaming/viewGameLobby.do?mode=display";
  6.     self.close();
  7. }
  8.  
  9. function childWindowCloseFree(){
  10.     flag = true;
  11.     self.close();
  12. }
  13.  
  14. function forwardToAddFunds(url){
  15.     if( self.opener ){
  16.         flag = true;
  17.         self.window.close();
  18.         window.opener.location.href = url;
  19.     } 
  20. }
  21.  
  22.  
  23. function showReglement(url){
  24.     window.open(url);
  25. }
  26.  
  27. function openFlash(){
  28.     if(self.opener){
  29.         flag = true;
  30.         window.open('http://www.adobe.com','newWindow','target=blank,addressbar=yes,menubar=yes,status=yes,scrollbars=yes,resizable=yes');
  31.         parent.window.close();
  32.     }
  33. }
  34.  
[HTML]</script>
</head>


<body id="play">
<bean:define id="currentBalance" name="purchaseInstGameForm" type="java.lang.String" property="walletBalance"/>[/HTML]
Expand|Select|Wrap|Line Numbers
  1. <%
  2.       Locale myLocale = new Locale(GlobalApplicationObject.getInstance().getSetting(Global.SETTING_SYSTEM_LOCALE_LANG),
  3.    GlobalApplicationObject.getInstance().getSetting(Global.SETTING_SYSTEM_LOCALE_COUNTRY));
  4.    NumberFormat numberFormatter = NumberFormat.getCurrencyInstance(myLocale);
  5.  
  6.    DecimalFormatSymbols dSymbols = new DecimalFormatSymbols(myLocale);
  7.    dSymbols.setGroupingSeparator('.');
  8.  
  9.    ((DecimalFormat)numberFormatter).setDecimalFormatSymbols(dSymbols);
  10. %>
  11. <jsp:useBean id="purchaseInstGameForm" scope="request" class="com.gtech.esi.core.gui.player.game.instant.form.PurchaseInstantForm" />
  12. <%
  13. //This is needed since the page is refreshing and hence the way the url getData url is going to get constructed again
  14.     String genericLoader = request.getContextPath() + "/movies/generic.loader.swf?";
  15.     String gamePrefix = purchaseInstGameForm.getGamePrefix();
  16.     String gameId = request.getParameter( "gameId" );
  17.     String flashVer = request.getParameter( "flashVersion" );
  18.     String gameType = request.getParameter( "type" );
  19.     String mode = request.getParameter( "mode" );
  20.     String gameTimeout = GlobalApplicationObject.getInstance().getSetting( Global.SETTING_PLAYER_SESSIONTIME );
  21.     String recoverDataSource = "recover_datasource=NIL";
  22.     String purchaseDataSource = "purchase_datasource=/player/gaming/wager/purchaseInstGame.do?gameId="+gameId+"&type="+gameType+"&mode=process";
  23.     String endGameDataSource = "endgame_datasource=/player/gaming/endGameExitPressed.do?gameId="+gameId+"&type="+gameType+"&mode=process";
  24.  
  25.     if( request.getAttribute("recover") != null && ((String)request.getAttribute("recover")).equals("true"))
  26.         {
  27.         recoverDataSource = "recover_datasource=/player/gaming/wager/purchaseInstGame.do?gameId="+gameId+"&type="+gameType+"&recover_mode=recover";
  28.         request.removeAttribute("recover");
  29.         }
  30.  
  31.     String urlParams = "flashGame=" + request.getContextPath() + "/movies/" + gamePrefix + "/"
  32.         + "&gameID=" + gameId
  33.         + "&flashVersion=" + flashVer
  34.         + "&type=" + gameType
  35.         + "&sess_to=" + gameTimeout
  36.         + "&ticketID=" + "TEST"
  37.         + "&gameProvider=" + "TEST"
  38.         + "&gamePrefix=" + gamePrefix
  39.         + "&played="
  40.         + "&"
  41.         + purchaseDataSource 
  42.         +"&"
  43.         + recoverDataSource 
  44.         +"&"
  45.         + endGameDataSource;
  46.  
  47.  
  48.  
  49.     String urlPlayPart = genericLoader + urlParams;// commented this since it is included in urlparams.+ purchaseDataSource;
  50.  
  51. %>
  52.  
  53. <%
  54.     String errorCode = (String) request.getAttribute(Global.GAME_ERROR_KEY);
  55.     if(errorCode !=null && errorCode.equals(Global.ERROR_INSUFFICIENT_FLASH)){
  56.  
  57. %>
  58. <table>
  59.     <tr>
  60.         <td>
  61.             <bean:message key="PlayInstGame.FlashError.errorCopy1"/>&nbsp;
  62.             <a href="#" onclick='javascript:openFlash();'><bean:message key="PlayInstGame.FlashError.errorCopy3"/></a>
  63.             &nbsp;<bean:message key="PlayInstGame.FlashError.errorCopy2"/>
  64.         </td>
  65.     </tr>
  66. </table>
  67. <%    
  68. }else{
  69. %>
  70.  
  71. <script>
  72.     if (navigator.userAgent.indexOf("MSIE") >= 0)
  73.     {
  74.         document.writeln("<table align='center' border='0' style='margin-left:-6px;margin-top:-5px'>");
  75.     }else if(navigator.userAgent.indexOf("Firefox") >= 0)
  76.     {
  77.         document.writeln("<table align='center' style='margin-left:4px;'>");
  78.     }
  79. </script>
  80.  
  81.  
  82.                 <tr>
  83.                     <td>
  84.                         <img src="<%=request.getContextPath()%>/images/logo.gif" style="position:absolute;top:5px; margin-top:0px;">
  85.                     </td>
  86.                     <% if( gameType.equals("free") ) {%>
  87.                     <td style="position:absolute; top:5px; left:420px" >
  88.                         <object type="application/x-shockwave-flash" data="<%=request.getContextPath()%>/lottery/fr/flash/demo.swf" style="margin-bottom: 5px; position: relative; top: -3px; left: -160px;" height="38" width="300" onload="activateFlash(this)">
  89.                             <param name="movie" value="<%=request.getContextPath()%>/lottery/fr/flash/demo.swf">
  90.                         </object>
  91.                     </td> 
  92.                     <% } %>
  93.                     <% if( !gameType.equals("free") ) {
  94.                             PlayerBean playerBean = (PlayerBean) request.getSession().getAttribute(
  95.                 Global.SESSION_PLAYER_DATA);
  96.                             if(playerBean.getPaymentcardAccount() != null){
  97.                     %>
  98.                     <td align="right" id="transferFunds" style="position:absolute; top:5px; left:440px; visibility:hidden;" ><a href="javascript:#"><img onclick="forwardToAddFunds('/player/account/wallet/landing.do?action=add');return false;" src="<%= request.getContextPath() %>/images/btn_transfer.gif" border="0" alt="" align="absmiddle"></a></td> 
  99.                 <%} else {
  100.                         %>
  101.  
[HTML] <td align="right" id="transferFunds" style="position:absolute; top:5px; left:440px; visibility:hidden;" ><a href="javascript:#"><img onclick="forwardToAddFunds('/player/account/wallet/landing.do?action=changeDebitCard');return false;" src="<%= request.getContextPath() %>/images/btn_transfer.gif" border="0" alt="" align="absmiddle"></a></td>
<% }} %>

<td id="dropDownId" style="visibility:hidden;">
[/HTML]
Expand|Select|Wrap|Line Numbers
  1.                 <%
  2.                     String leftWidth = "220px";
  3.                     if(!gameType.equals("free")){
  4.                         leftWidth = "220px";
  5.                     } else if( gameType.equals("free") ){
  6.                         leftWidth = "600px";
  7.                     }
  8.                 %>
  9.  
[HTML] <ul class="menulist" id="listMenuRoot" style="position:absolute; top:5px; left:<%=leftWidth%>; margin:0px; padding:0px;">
<li>
[/HTML]
Expand|Select|Wrap|Line Numbers
  1.                 <% if( gameType.equals("free") ) {%>
  2.                     <a href="javascript:#"><img src="<%= request.getContextPath() %>/images/btn_select_demo.gif" border="0" alt="" width="200" align="absmiddle"></a>
  3.                 <% } else {%>
  4.                     <a href="javascript:#"><img src="<%= request.getContextPath() %>/images/btn_autrex_jue.gif" border="0" alt="" align="absmiddle"></a>
  5.                 <% } %>
  6.  
[HTML] <ul class="sub" id="dropdown">
<li class="cat" style="width:195px">&nbsp;</li>

<logic:notEmpty name="purchaseInstGameForm" property="allInstGames">
<logic:iterate id="instGames" name="purchaseInstGameForm" property="allInstGames" type="com.gtech.esi.ire.core.player.game.area.valu e.GameAttributesVO">
<li class="cat" style="width:195px">

<% if( gameType.equals("free") ) { %>
<script>[/html]
Expand|Select|Wrap|Line Numbers
  1.                                         if (navigator.userAgent.indexOf("MSIE") >= 0){
  2.                                             //alert("IE");
  3.                                             document.writeln("<span style='position:absolute; left:0px; clear:left; float:left'>");
  4.                                         }else if(navigator.userAgent.indexOf("Firefox") >= 0){
  5.                                             //alert("FF");
  6.                                             document.writeln("<span style='position:relative;left:0px; clear:left;'>");
  7.                                         }
  8.  
[HTML] </script>
&nbsp;&nbsp;

<img src="<%=request.getContextPath()%>/images/white_point.gif" style="vertical-align:middle ">&nbsp;&nbsp;
<a href="<%=request.getContextPath()%>/gaming/wager/purchaseInstGame.do?mode=display&type=<%=gameType% >&gameId=<bean:write name='instGames' property='gameId'/>&flashVersion=" class="fontdrop" onclick="setValue()"><bean:write name="instGames" property="gameName"/>
</a>
</span>
<script>
if (navigator.userAgent.indexOf("MSIE") >= 0){
document.writeln("<span class='fontprice'>");
}else if(navigator.userAgent.indexOf("Firefox") >= 0){
document.writeln("<span class='fontprice' style='float:right;'>");
}
</script>
<bean:write name="instGames" property="gameCost"/> &euro;&nbsp;</span>
<% } else { %>

<script>
if (navigator.userAgent.indexOf("MSIE 6") >= 0){
//alert("IE");
document.writeln("<span style='position:absolute; left:0px; clear:left; float:left;'>");
} else if(navigator.userAgent.indexOf("MSIE 7") >= 0){
document.writeln("<span style='position:absolute; left:0px; clear:left; float:left;'>");
} else if(navigator.userAgent.indexOf("Firefox") >= 0){
//alert("FF");
document.writeln("<span style='position:relative;left:0px; clear:left;'>");
}
</script>
&nbsp;&nbsp;

<img src="<%=request.getContextPath()%>/images/white_point.gif" style="vertical-align:middle ">&nbsp;&nbsp;
<a href="<%=request.getContextPath()%>/gaming/wager/purchaseInstGame.do?mode=display&type=<%=gameType% >&gameId=<bean:write name='instGames' property='gameId'/>&flashVersion=" class="fontdrop" onclick="setValue()"><bean:write name="instGames" property="gameName"/>
</a>
</span>
<script>
if (navigator.userAgent.indexOf("MSIE 6") >= 0){
document.writeln("<span class='fontprice'>");
} else if(navigator.userAgent.indexOf("MSIE 7") >= 0){
document.writeln("<span class='fontprice'>");
} else if(navigator.userAgent.indexOf("Firefox") >= 0){
document.writeln("<span class='fontprice' style='float:right;'>");
}
</script>
<bean:write name="instGames" property="gameCost"/> &euro;&nbsp;</span>
<% } %>
</li>

</logic:iterate>
</logic:notEmpty>

</ul>

</li>
</ul>

</td>
[/HTML]
Expand|Select|Wrap|Line Numbers
  1.                 <% if( !gameType.equals("free") ) {%>
  2.                     <td align="right" id="walletBalance" style="position:absolute; top:20px; left:660px; visibility:hidden;"><bean:message key="PlayGame.playInstGame.walletBalance"/><span style="font:bold; left:620px;" id="walletBalanceId"></span> </td>
  3.                 <% } %>
  4.  
[HTML] </tr>
<script>displayWalletBalance('','<%=currentBalance %>'); </script>
<tr><td><img src="<%=request.getContextPath()%>/lottery/img/pixel.gif" width="1" height="30" border="0" alt=""></td></tr>
<tr class = 'bgcol' >

<td valign="center" colspan = "4">
<%

String error = (String) request.getAttribute(Global.GAME_ERROR_KEY);

if(null != error && error.equalsIgnoreCase(Global.ERROR_INSUFFICIENT_F LASH)){
request.setAttribute(Global.GAME_ERROR_KEY, Global.ERROR_INSUFFICIENT_FLASH);

%>
<script>forwardToAddFunds('<%= request.getContextPath()%>/flashError.do?flashError=true')</script>
<%
} else if(null != error && error.equalsIgnoreCase(Global.ERROR_GAME_UNAVAILAB LE)) {
request.setAttribute(Global.GAME_ERROR_KEY, Global.ERROR_GAME_UNAVAILABLE);

%>
<script>forwardToAddFunds('<%= request.getContextPath()%>/gameUnavailableError.do?unavailableError=true')</script>
<%
}else {
%>
<div id="flashGameFile" style="margin-border=1;" >
<script type="text/javascript">
AC_FL_RunContent('classid','clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ,'codebase','https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width','790','height','520','src','<%=urlPlayPart %>','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer', 'movie','<%=request.getContextPath()%>/movies/generic.loader','bgcolor','#6DB344', 'wmode','transparent','id','game','FlashVars','<%= urlParams%>' ); //end AC code
</script>
</div>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" style="margin-border=1;" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="790" height="520" id="game" align="middle">
<param name="wmode" value="transparent">
<param name="movie" value=<%=urlPlayPart%> />
<param name="quality" value="high" />
<param name="bgcolor" value="#6DB344" />
<param name=FlashVars value=<%=urlParams%> />
<embed src=<%=urlPlayPart%> quality="high" bgcolor="#6DB344" width="790" height="520" name="game" align="middle" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" FlashVars="<%=urlParams%>" wmode="transparent"/>
</object>
</noscript>
<%}%>
</td>

</tr>

<tr class = 'bgcol' style="height: -5;">
<%
String urlForReglement = "#";
if( request.getParameter( "gameId" ).equals( Integer.toString(Global.GAME_ID1) ) ){
urlForReglement = request.getContextPath()+"/lottery/fr/rubbel/elo/pdf/reglement.pdf";
} else if( request.getParameter( "gameId" ).equals( Integer.toString(Global.GAME_ID2) ) ){
urlForReglement = request.getContextPath()+"/lottery/fr/rubbel/okidoki/pdf/reglement.pdf";
}else if( request.getParameter( "gameId" ).equals( Integer.toString(Global.GAME_ID3) ) ){
urlForReglement = request.getContextPath()+"/lottery/fr/rubbel/picco/pdf/reglement.pdf";
}
%>
<td id="reglementOfficiel" style="visibility:hidden;" align ="left" colspan="1"><a href="javascript:#" onclick="showReglement('<%=urlForReglement%>');ret urn false;"><bean:message key="PlayGame.playInstGame.reglementOfficiel"/></a>&nbsp;</td>
<% if( gameType.equals("free") ) {%>
<td align="middle"><img src="<%= request.getContextPath() %>/images/demo_title.gif" border="0" alt="" align="absmiddle"></td>
<% } else {%>
<td align = "left">
<span style="left:120px" id="ticketNumberId"></span>
</td>
<% } %>
<% if( gameType.equals("free") ) {%>
<td align="right" colspan="1"><a href="javascript:#" onclick="childWindowCloseFree();return false;"><bean:message key="PlayGame.playInstGame.quitPlay.Free"/></a></td>
<% } else {%>
<td align="right" colspan="1"><a href="javascript:#" onclick="childWindowClose('<%=request.getContextPa th()%>');return false;"><bean:message key="PlayGame.playInstGame.quitPlay"/></a></td>
<% } %>
</tr>
</table>
<% } %>
</body>[/HTML]
Nov 26 '07 #13
acoder
16,027 Expert Mod 8TB
Please use code tags when posting code.

Have you checked that the "type" request variable is equal to "wager"?

When you view the source, what does confirmExit look like?
Nov 26 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jenny | last post by:
I open page 1 and page 2 from main page. I want to close page 2 from page 1 after I finish processing some work in page 1. Does anyone know how to do that? Thanks, Jenny
6
by: kaeli | last post by:
Hey guys, This error occurs ONLY in Netscape 7.0. Not in 7.1. So, I think it's a bug. Buuuut... Has anyone had this problem or know of a fix? When attempting to have an onunload function...
3
by: sentinel | last post by:
Hi all, I'm trying to reload a frame from a pop-up, but really cannot figure this out. Within my index.htm file, I make a link to call a pop-up frame with a javascript function that calls the...
3
by: NeverLift | last post by:
But, if it's not open, I don't want to open it . . . using window.open will open it if it doesn't exist, even if the url in that open is null (the window is then empty -- but it's open). The...
10
by: Tom Szabo | last post by:
Is there an event when that triggers when the window is closing.... I am talking about when the user clicks on the cross on the right top corner of the window!!!
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
6
by: Luke Matuszewski | last post by:
As in topic... has anyone used it ? I tried to use it but i guess i failed... here is a code: <html> <head> <title></title> <script type="text/javascript"> function closedWin() {...
13
by: Seth Grimes | last post by:
Hello all, I want to open a window when a user leaves my site. I set up a function called by onUnload. To skip the window.open if the user hasn't left my site, I set a variable in my links and...
3
by: Jimmy | last post by:
It is also possible for popup window to call function in main window by using the opener property. Will "opener.someFunctionInMain(param1, param2)" in the popup window work? It's possible for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.