[LAYER] {evangelism} netbank.com uses proprietary document.layers in JS

VERIFIED DUPLICATE of bug 85005

Status

Tech Evangelism Graveyard
English US
VERIFIED DUPLICATE of bug 85005
17 years ago
3 years ago

People

(Reporter: earthsound, Assigned: bc)

Tracking

Details

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010628
BuildID:    2001062815

This may be two bugs in one. After reading this, a knowledgable person thinks
another bug should be open, please let me know.

Sorry, but this example requires a login into netbank.com to see a live example.
 Once logged in, go to "Bank Mail & Requests" > "check & deposit slip reorder" >
"Deposit Slip". A new window will pop up showing a (supposed to be) printable
deposit slip for your account. They use the following script (among others on
this page, and presumably others):

<!-- //
var display = false;
if (document.layers) display = true;
if (navigator.appName == "Microsoft Internet Explorer" &&
(navigator.appVersion.indexOf('MSIE 5') != -1)) display = true;
if (display == true) {
	document.open();
	document.write('<input type="button" value="Print" name="butPrint"
onClick="window.print()">');
	document.close();
}
// -->

This is a clear case for evangelizing! :) I'd like them to convert quickly, as I
have unspoken qualms about using IE & would prefer not to go back to NS4.X which
both obviously display the "Print" button, as they support this proprietary crap...

A side note (another bug?!): Even though there is no "Print" button, I do have
the Mozilla menus at the top of the new window, and upon clicking File > Print,
instead of printing what I'm looking at (gray bg w/ deposit slip-looking section
@ top of page and instructions under deposit slip) it prints an entire page of
gray! The following is a code snippet of the instructions...why they don't print
is unknown to me (I don't believe I had this particular problem w/ past
Mozilla's, though I'm not even sure which Moz version I last used to print a
deposit slip)

Reproducible: Always
Steps to Reproduce:
1. Login to netbank.com
2. Click "Bank Mail & Requests" at top
3. Click "check & deposit slip reorder" at the left
4. Click the "Deposit Slip" button
5. Notice no "Print" button.
6. Using File > Print results in a complete gray page

Actual Results:  No "Print" button. Printing via File > Print results in a
completely gray page (no deposit slip or instructions)

Expected Results:  Should have sent a detailed explanation to the offending
site, complete with proprietary code that should be replaced, along with reasons
for doing so...so this bug wouldn't have to be made. ;)

Mozilla isn't the culprit here...except maybe in what was actually printed,
which was expected to be the deposit slip w/ instructions.

What follows is the code for the entire page, with my address and account info
removed for obvious reasons. Warning! It may be long:

<html>

<head>

<title>Remittance Deposit Slip</title>

</head>

<body bgcolor="#C0C0C0">
<form method="POST" action="none" name="slip">

<center>

<table border="0" cellpadding="2" cellspacing="0" bgcolor="#000000">
<tr>
<td>



<table border="0" cellpadding="4" cellspacing="0" bgcolor="#FFFFFF">

<tr>

<td valign="top" align="center" nowrap><font size="2"
face="Arial,Sans-Serif">REMITTANCE

      DEPOSIT SLIP</font></td>

<td rowspan="3">

<table border="0" cellpadding="0" cellspacing="0">

<tr>

<td nowrap>

<table border="1" cellpadding="0" cellspacing="0" bordercolor="#808080">

<tr>

<td align="center" nowrap valign="middle"><font size="1"
face="Arial,Sans-Serif">&nbsp;LIST

                  CHECKS SINGLY&nbsp;</font></td>

<td align="center" nowrap><font face="Arial,Sans-Serif" size="1">DOLLARS</font></td>

</tr>

<tr>

<td align="center" nowrap valign="middle">

<input type="text" name="a_chk" size="13">

</td>

<td align="center" nowrap valign="middle">
<p align="center"><input type="text" name="a_dol" size="9" justify="right"></p>
</td>

</tr>

<tr>

<td align="center" nowrap valign="middle">

<input type="text" name="b_chk" size="13">

</td>

<td align="center" nowrap valign="middle"><input type="text" name="b_dol"
size="9"></td>

</tr>

<tr>

<td align="center" nowrap valign="middle">

<input type="text" name="c_chk" size="13">

</td>

<td align="center" nowrap valign="middle"><input type="text" name="c_dol"
size="9"></td>

</tr>

<tr>

<td align="center" nowrap valign="middle"><input type="text" name="d_chk" size="13">

</td>

<td align="center" nowrap valign="middle"><input type="text" name="d_dol"
size="9"></td>

</tr>

<tr>

<td align="center" nowrap><font face="Arial,Sans-Serif" size="1">TOTAL

                  FROM<br>

OTHER SIDE</font></td>

<td align="center" valign="middle" nowrap><input type="text" name="e_dol"
size="9"></td>

</tr>

<tr>

<td align="center" nowrap>

<table border="0" cellpadding="2" cellspacing="0" height="30">

<tr>

<td>
<p align="center"><font face="Arial,Sans-Serif" size="1" color="#333333"><b>Total
                        Items</b></font></p>
</td>

<td rowspan="2" valign="middle" align="right" nowrap><font
face="Arial,Sans-Serif" size="2"><b>TOTAL </b></font></td>

</tr>

<tr>

<td bgcolor="#DEDEDE">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#FFFFFF"><input type="text" name="tot_items" size="4"></td>
</tr>
</table>
</center>
</div>
</td>

</tr>

</table>

</td>

<td align="center" nowrap valign="top"><input type="text" name="tot_dol"
size="9"><br>
<b><input type="button" VALUE="Calculate" onClick="total(this.form)"
name="B1"></b></td>

</tr>

</table>

</td>

<td valign="bottom"><font face="Arial,Sans-Serif" size="1"
color="#333333">&nbsp;</font>

</td>

</tr>

</table>

</td>

</tr>

<tr>

<td valign="top" align="left" nowrap>

<blockquote>

<p><font face="Arial,Sans-Serif" size="2"><b>DAVID H GUNNELLS<br>

</b>THIS ADDRESS OBFUSCATED<br>TO PROTECT MY ARSE</font></p>

</blockquote>

</td>

</tr>

<tr>

<td nowrap>

<blockquote>

<blockquote>

<p><font face="Arial,Sans-Serif" size="2">DATE: <u>07/02/2001 09:29pm<br>

</u></font><font face="Arial,Sans-Serif" size="1"><b><i>DEPOSITS MAY

          NOT BE AVAILABLE FOR&nbsp;<br>

IMMEDIATE WITHDRAWAL. DO NOT SEND CASH<br>

PLEASE DO NOT STAPLE CHECKS TO&nbsp;<br>

REMITTANCE SLIP.</i></b></font></p>

</blockquote>

</blockquote>

</td>

</tr>

<tr>

<td nowrap>

<blockquote>

<p><a href="http://www.netbank.com/"><img border="0" src="/images/logo_slip.gif"
width="96" height="19"></a>
<font face="Arial,Sans-Serif" size="3"><b><br>

</b></font><font face="Arial,Sans-Serif" size="2">P.O. BOX 2368<br>

ALPHARETTA,&nbsp; GA 30023</font></p>

</blockquote>

</td>

<td nowrap>

<div align="center">
<center>

<table border="0" cellpadding="0" cellspacing="0">

<tr>

<td valign="top" align="left"><b><i><font face="Arial,Sans-Serif" size="1">Be
Sure Each Item Is
            &nbsp;properly endorsed</font></i>&nbsp;</b>
<p><b>my account # has been removed for obvious reasons :)</b></p>
</td>

</tr>

</table>

</center>
</div>

</td>

</tr>

<tr>

<td colspan="2" nowrap>

<blockquote>

<p><font face="Arial,Sans-Serif">Again, my account # is removed for my own
protection</font><font face="Arial,Sans-Serif" color="#333333" size="1"><br>

Checks And Other Items Are
        Received For Deposit Subject To The Provisions Of The Uniform Commercial
        Code.</font></p>

</blockquote>

</td>

</tr>

</table>

</td>
</tr>
</table>
<p><b><br>
<script LANGUAGE="JavaScript">
<!-- //
var display = false;
if (document.layers) display = true;
if (navigator.appName == "Microsoft Internet Explorer" &&
(navigator.appVersion.indexOf('MSIE 5') != -1)) display = true;
if (display == true) {
	document.open();
	document.write('<input type="button" value="Print" name="butPrint"
onClick="window.print()">');
	document.close();
}
// -->
</script>

<input type="reset" value="Close" name="pbClose" onClick="window.close()"></b></p>
</center>

</form>

<script Language="JavaScript"><!--
function total(theForm)
{

  var checkOK = "0123456789.";
  var checkStr = theForm.a_dol.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
	
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Dollars\" field.");
    theForm.a_dol.value = "";
    theForm.a_dol.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Dollars\" field.");
    theForm.a_dol.value = "";
    theForm.a_dol.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseFloat(allNum);
  if (chkVal != "" && !(prsVal >= "0"))
  {
    alert("Please enter a value greater than or equal to \"0\" in the
\"Dollars\" field.");
    theForm.a_dol.value = "";
    theForm.a_dol.focus();
    return (false);
  }

  var checkOK = "0123456789.";
  var checkStr = theForm.b_dol.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
	
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Dollars\" field.");
    theForm.b_dol.value = "";
    theForm.b_dol.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Dollars\" field.");
    theForm.b_dol.value = "";
    theForm.b_dol.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseFloat(allNum);
  if (chkVal != "" && !(prsVal >= "0"))
  {
    alert("Please enter a value greater than or equal to \"0\" in the
\"Dollars\" field.");
    theForm.b_dol.value = "";
    theForm.b_dol.focus();
    return (false);
  }

  var checkOK = "0123456789.";
  var checkStr = theForm.c_dol.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
	
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Dollars\" field.");
    theForm.c_dol.value = "";
    theForm.c_dol.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Dollars\" field.");
    theForm.c_dol.value = "";
    theForm.c_dol.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseFloat(allNum);
  if (chkVal != "" && !(prsVal >= "0"))
  {
    alert("Please enter a value greater than or equal to \"0\" in the
\"Dollars\" field.");
    theForm.c_dol.value = "";
    theForm.c_dol.focus();
    return (false);
  }

  var checkOK = "0123456789.";
  var checkStr = theForm.d_dol.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
	
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Dollars\" field.");
    theForm.d_dol.value = "";
    theForm.d_dol.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Dollars\" field.");
    theForm.d_dol.value = "";
    theForm.d_dol.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseFloat(allNum);
  if (chkVal != "" && !(prsVal >= "0"))
  {
    alert("Please enter a value greater than or equal to \"0\" in the
\"Dollars\" field.");
    theForm.d_dol.value = "";
    theForm.d_dol.focus();
    return (false);
  }

  var checkOK = "0123456789.";
  var checkStr = theForm.e_dol.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  
	
	for (i = 0;  i < checkStr.length;  i++) {
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j))
			break;
			if (j == checkOK.length)
			{
				allValid = false;
				break;
			}
		if (ch == ".")
		{
			allNum += ".";
			decPoints++;
		}
		else if (ch != ",")
			allNum += ch;
	}
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Dollars\" field.");
    theForm.e_dol.value = "";
    theForm.e_dol.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Dollars\" field.");
    theForm.e_dol.value = "";
    theForm.e_dol.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseFloat(allNum);
  if (chkVal != "" && !(prsVal >= "0"))
  {
    alert("Please enter a value greater than or equal to \"0\" in the
\"Dollars\" field.");
    theForm.e_dol.value = "";
    theForm.e_dol.focus();
    return (false);
  }
  
  if (!(parseFloat(theForm.a_dol.value))) {
  	var a = 0;
  } else {
  	var a = theForm.a_dol.value;
  }

  if (!(parseFloat(theForm.b_dol.value))) {
  	var b = 0;
  } else {
  	var b = theForm.b_dol.value;
  }

  if (!(parseFloat(theForm.c_dol.value))) {
  	var c = 0;
  } else {
  	var c = theForm.c_dol.value;
  }

  if (!(parseFloat(theForm.d_dol.value))) {
  	var d = 0;
  } else {
  	var d = theForm.d_dol.value;
  }

  if (!(parseFloat(theForm.e_dol.value))) {
  	var e = 0;
  } else {
  	var e = theForm.e_dol.value;
  }

  var tot = parseFloat(a) + parseFloat(b) + parseFloat(c) + parseFloat(d) +
parseFloat(e);
  
  var chkVal = tot;
  var prsVal = parseFloat(tot);
  if (chkVal != "" && !(prsVal >= "0"))
  {
	theForm.tot_dol.value = "Error";
    return (false);
  } else {
  	theForm.tot_dol.value = roundit(tot);
  }
  
  return (true);
  
}

function roundit(n) {return(.01* Math.floor(100*n));}

//--></script>

<p><font face="Arial,Sans-Serif"><b>INSTRUCTIONS: </b> To make a deposit by
mail, please complete the online deposit form
above. When finished, print your completed form and mail it to us along with
your endorsed checks to the address printed on the deposit slip. All
transactions are subject to verification by NetBank. We cannot accept credit
card checks, counter checks, or third-party checks. Please allow 5-7 business
days for delivery by the US Postal Service to NetBank.
Please read our <a
href="http://www.netbank.com/terms_back_fundsavailability.htm">Funds
Availability Disclosure</a>.</font></p>

</body>

</html>

Comment 1

17 years ago
Note also bug 85005, which deals with the same site.  

phish@marko.net, would you mind in the future using "Create a new attachment" to
attach lengthy page sources?  (The QA folks have to go through all the comments
at the end, and their eyes start to bleed after a certain amount of text scrolls
by.)  Thanks!
(Assignee)

Comment 2

17 years ago
reporter: please save the html to a file and use the "Create attachment" link
above to attach the source either as text/plain or text/html. Having the entire
source in the bug comments means we have to scroll past it each time we look at
the bug to see what comments have been added.

dup -> 85005

*** This bug has been marked as a duplicate of 85005 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 3

17 years ago
Sorry for the large source inclusion...taking note of the attachments utility.
:) WRT the second part of this bug, which isn't mentioned in bug 85005, should I
open a new bug? I'm referring to the fact that when printing above mentioned
deposit slip page, a completely gray page prints out...whereas I never had this
problem in past builds. 
(Assignee)

Comment 4

16 years ago
All Evangelism Bugs are now in the Product Tech Evangelism. See bug 86997 for
details.
Component: Evangelism → US English
Product: Browser → Tech Evangelism
Version: other → unspecified

Comment 5

16 years ago
verif
Status: RESOLVED → VERIFIED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.