HTML to Excel data import via JavaScript - javascript

<div id="printing">
<div id='state'>
<table id="dataTable" cellspacing="0" cellpadding="0" align="center" style="table-layout: fixed; font:Arial, Helvetica, sans-serif">
<thead>
<tr align="center" style="font-size:20px;">
<td colspan="11"><u>Ministry of Health & Family Welfare</u></td>
</tr>
<tr align="center" style="font-size:20px;">
<td colspan="11"><u>(Monitoring & Evaluation Division)</u></td>
</tr>
<tr align="center" style="font-size:20px;">
<td colspan="11"><u>Monthly Format for Sub Center and Equivalent Institutions</u></td>
</tr>
<br></br>
<tr align="center">
<td>State :</td>
<td style=" border:solid black 1px;width:300px;" id='stateID'></td>
<td><td>
<td style=" border:solid black 1px;width:300px;" bgcolor="#7CFC00">Due for Submission on 5th of following Month</td>
</tr>
<tr align="center">
<td>District :</td>
<td style=" border:solid black 1px;width:300px;" id='districtID'> </td>
<td>Month<td>
<td style=" border:solid black 1px;width:300px;" id='month'></td>
</tr>
<tr align="center">
<td>Block :</td>
<td style=" border:solid black 1px;width:300px;" id='blockID'> </td>
<td>Year<td>
<td style=" border:solid black 1px;width:300px;" id='year'></td>
</tr>
<tr align="center">
<td>City/ Town/ Village:</td>
<td style=" border:solid black 1px;width:300px;" id='cityID'> </td>
</tr>
<tr align="center">
<td>Facility name :</td>
<td style=" border:solid black 1px;width:300px;" id='facilityID'> </td>
</tr>
<tr align="center">
<td >Facility type :</td>
<td style=" border:solid black 1px;width:300px;">
<label class="radio-inline"><input type="radio" id="publicID" name="facilityType" checked><span style="font-weight: bold;">Public</span></label>
<label class="radio-inline"><input type="radio" id="privateID" name="facilityType" disabled><span style="font-weight: bold;">Private</span></label>
</td>
</tr>
<tr align="center">
<td >Location :</td>
<td style=" border:solid black 1px;width:300px;">
<label class="radio-inline"><input type="radio" id="ruralID" name="location"><span style="font-weight: bold;">Rural</span></label>
<label class="radio-inline"><input type="radio" id="urbanID" name="location"><span style="font-weight: bold;">Urban</span></label></td>
</tr>
<tr style="height:80px;">
<td align="center" colspan="5" bgcolor="yellow" style=" border:solid black 1px;">&nbsp</td>
<td align="center" colspan="2" bgcolor="yellow" style=" border:solid black 1px;">Numbers reported during the Month</td>
<td align="center" colspan="2" bgcolor="yellow" style=" border:solid black 1px;">Ref.No</td>
<td align="center" colspan="1" width="2px;"></td>
<td align="center" colspan="2" bgcolor="yellow" style=" border:solid black 1px;">Validation Error</td>
</tr>
<tr style="height:35px;">
<td align="center" colspan="5" bgcolor="yellow" style=" border:solid black 1px;" >Part A. REPRODUCTIVE AND CHILD HEALTH</td>
<td align="center" colspan="2" bgcolor="yellow" style=" border:solid black 1px;" ></td>
<td align="center" colspan="2" bgcolor="yellow" style=" border:solid black 1px;" ></td>
<td align="center" colspan="1" width="2px;" ></td>
<td align="center" colspan="2" bgcolor="yellow" style=" border:solid black 1px;" ></td>
</tr>
<tr style="height:35px;">
<td align="center" bgcolor="#7CFC00" colspan="1" style=" border:solid black 1px;" >M1</td>
<td align="center" bgcolor="#7CFC00" colspan="6" style=" border:solid black 1px;" >Ante Natal Care Services (ANC)</td>
<td align="center" bgcolor="#7CFC00"colspan="2" style=" border:solid black 1px;" >M1</td>
<td align="center" colspan="1" width="2px;" ></td>
<td align="center" bgcolor="#7CFC00"colspan="2" style=" border:solid black 1px;" ></td>
</tr>
</thead>
<tbody >
<tr align="center" >
<td align="left" colspan="1" style=" border:solid black 1px;" >1</td>
<td align="center" colspan="4" style=" border:solid black 1px;text-align:left;"><b> Total number of pregnant women Registered for ANC</b> </td>
<td align="center" colspan="1" style=" border:solid black 1px;width:150px;" class="de" id='y72RhR0QcFn'> </td>
<td align="center" colspan="1"> </td>
<td align="center" colspan="2" style=" border:solid black 1px;text-align:left;">1.1</td>
<td align="center" colspan="1" style=" border:solid black 1px;text-align:left; width:0.1px;">7|txt_Numbers_1</td>
</tr>
<tr align="center" >
<td align="center" colspan="1" style=" border:solid black 1px;">1.1</td>
<td align="center" colspan="4" style=" border:solid black 1px;text-align:left;"> <i>Of which Number registered within first trimester(within 12 weeks)</i> </td>
<td align="center" colspan="1" style=" border:solid black 1px;width:150px;" class="de" id='IFYdW0qXXcy'> </td>
<td align="center" colspan="1"> </td>
<td align="center" colspan="2" style=" border:solid black 1px;text-align:left;">1.1.1</td>
<td align="center" colspan="1" style=" border:solid black 1px;text-align:left; width:0.1px;">7|txt_Numbers_1_1</td>
//this aere the formulas that i provided manually
IF(ISBLANK(F15)*ISBLANK(F16),"",IF(F16<=G15,"","No. of pregnant women registered for ANC within 1st trimester(M1-1.1) <= No. of pregnant women registered for ANC(M1-1)"))
</tr>
<tr align="center" >
<td align="left" colspan="1" style=" border:solid black 1px;">2</td>
<td align="center" colspan="4" style=" border:solid black 1px;text-align:left;">Number of New women registered under Janani Suraksha Yogna</td>
<td align="center" colspan="1" style=" border:solid black 1px;width:150px;" class="de" id='Dsam8TAhYRx'> </td>
<td align="center" colspan="1"> </td>
<td align="center" colspan="2" style=" border:solid black 1px;text-align:left;">1.2</td>
<td align="center" colspan="1" style=" border:solid black 1px;text-align:left;" width="2px;">7|txt_Numbers_2</td>
<td align="center" colspan="1" >=IF(ISBLANK(F17)*ISBLANK(F15),"",IF(F17<=F15,"","Cross Check : Number of women registered under JSY (M1-2) <= Total number of women registered for ANC(M1-1)"))</td>
</tr>

Related

How can I call function in HTML file for checkbox?

As a default, the checkbox is already checked but the tables are not hidden. As a default, the first two table shall be demonstrated. When you click on a few times, you can see hidden tables but they should be hidden as default checked. The problem is when I copy paste in https://codepen.io/ which is working because js directly calling the function. When you copy paste this code inside a html file, it is not working. How can I call function to get the result?
<html>
<head>
<script language="JavaScript">
function showMe(cls) {
var chboxs = document.getElementsByName("c1");
var vis = 0;
for (var i = 0; i < chboxs.length; i++) {
if (chboxs[i].checked) {
vis = 1;
break;
}
}
var elements = document.getElementsByClassName(cls);
for (let e of elements) {
if (vis === 1) {
e.style.display = 'none';
} else {
e.style.display = 'table';
}
}
}
show('box');
</script>
</head>
<br>
<table class="header" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<input type="checkbox" name="c1" checked="true" onclick="showMe('box')">Show Result
</td>
</tr>
</table>
<table class="uniqueborder" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tr>
<td class="uniqueborder" width="90%" align="center" bgcolor="#F3F3F3"><b>Event</b></td>
<td class="uniqueborder" width="10%" align="center" bgcolor="#F3F3F3"><b>Status</b></td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border-right:1px solid #CBCBCB; padding-left:2px; padding-right:2px" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="uniqueborder" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
</table>
</html>
I broke your js out into a separate file for ease of reading. Then i made the following tweaks:
add an id to your checkbox. this eliminates the need to check your element in a loop when there is only 1 of them and since its a checkbox there should always only be 1 with that name
pull the tables in by class name as you were and then convert the node collection to an array. then leverage the array builtin forEach loop.
lastly use a ternary if statement to set your table display for some syntactic sugar.
function showMe(cls) {
const checkbox = document.getElementById("c1"),
tables = Array.prototype.slice.call(document.getElementsByClassName(cls));
tables.forEach(function (t) {
t.style.display = checkbox.checked ? 'table' : 'none';
});
}
<table class="header" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<input type="checkbox" name="c1" id="c1" checked="true" onclick="showMe('box')">Show Result
</td>
</tr>
</table>
<table class="uniqueborder" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tr>
<td class="uniqueborder" width="90%" align="center" bgcolor="#F3F3F3"><b>Event</b></td>
<td class="uniqueborder" width="10%" align="center" bgcolor="#F3F3F3"><b>Status</b></td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border-right:1px solid #CBCBCB; padding-left:2px; padding-right:2px" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="uniqueborder" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; "><span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
Add the JS at the end of file, this is doesn't work, because you return the JS before HTML. You need render HTML before JS, and change show('box'); to showME('box');
<html>
<head></head>
<br>
<table class="header" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<input type="checkbox" name="c1" checked="true" onclick="showMe('box')">Show Result
</td>
</tr>
</table>
<table class="uniqueborder" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tr>
<td class="uniqueborder" width="90%" align="center" bgcolor="#F3F3F3">
<b>Event</b>
</td>
<td class="uniqueborder" width="10%" align="center" bgcolor="#F3F3F3">
<b>Status</b>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border-right:1px solid #CBCBCB; padding-left:2px; padding-right:2px" align="left">
<p style="margin: 0pt; ">Test </p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">
<span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">
<span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="uniqueborder" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">
<span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">
<span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
<table class="box" width="100%" bordercolor="#CBCBCB" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">
<span class="bluebold">1. Test input:</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
<tr>
<td class="uniqueborder" align="left">
<p style="margin: 0pt; ">
<span class="bluebold">1. Expected</span></p>
</td>
<td class="uniqueborder" align="center" width="10%">
<font color="gray">N/A</font>
</td>
</tr>
</tbody>
</table>
</table>
<script language="JavaScript">
function showMe(cls) {
var chboxs = document.getElementsByName("c1");
var vis = 0;
for (var i = 0; i < chboxs.length; i++) {
if (chboxs[i].checked) {
vis = 1;
break;
}
}
var elements = document.getElementsByClassName(cls);
for (let e of elements) {
if (vis === 1) {
e.style.display = 'none';
} else {
e.style.display = 'table';
}
}
}
showMe('box');
</script>
</html>
First you try to call the function show('box'); which does not exist. You should rename the call to showMe('box');
The second problem is the order of execution. Basically everything that is loaded is executed immediately. In your case, the first thing that is defined is the function showMe(). After that it is called immediately (see above). The problem that occurs now is that the HTML element that the function is supposed to access has not yet been rendered.
So the initial call of the function showMe('box') should be done after the HTML elements are rendered. You can do this by making the call at the end of the page in separate script tags or in the body tag in the onload method.
<body onload="showResults('box')">
...
</body>
Basically, you should use meaningful variable and function names (for example, "resultVisible" instead of "vis" or "showResults" instead of "showMe") and use them with the correct type, e.g. Boolean (true / false).
I would add an ID to the checkbox instead of a name. Since you only have one of them, you can save yourself a lot of scripting to determine whether the checkbox is set or not. You can also shorten the part where you control the visibility.
function showResults(cls) {
var checked = document.getElementById('c1').checked;
var elements = document.getElementsByClassName(cls);
for (let e of elements) {
e.style.display = (checked) ? 'table' : 'none';
}
}

Change size to PDF page (DOMPDF)

I'm creating a huge form, and I'm using a bank credit template as a basis. There's a slight issue:
When DOMPDF exports the content, it won't fit in the page.
How can I change the page size?
I tried with $dompdf->set_paper(DEFAULT_PDF_PAPER_SIZE, 'portrait'); and
$customPaper = array(0,0,360,360);
$dompdf->set_paper($customPaper);
but it won't work.
It displays the following: Please click to see the error displayed
Here's the big ass snippet of my code.
<?php
require_once("dompdf/dompdf_config.inc.php");
session_start();
if($_POST){
$empresa= $_POST["empresa"];
$fechaent= $_POST["fechaent"];
$horaent= $_POST["hentrada"];
$tecnico= $_POST["tecnico"];
$horasal= $_POST["hsalida"];
$rvisita= $_POST["razonvisita"];
$comentarios= $_POST["comentarios"];
$trabajor= $_POST["trabajorealizado"];
}
$codigoHTML='
<html>
<head>
<link rel=Stylesheet href=stylesheet.css>
<style>
h1 { font-size:40px; text-align:center; font-weight:bold; margin-bottom:10px; text-shadow:0 0 3px #ddd; }
h2 { font-size:15px; text-align:left; font-weight:bold; margin-bottom:10px; }
h3 { font-size:20px; text-align:left; font-weight:bold; margin-bottom:10px; text-shadow:0 0 3px #ddd; }
pre {background-color:"WHITE"; font-family:Arial; margin-left:50px; margin-right:50px;}
b{ font-family:Calibri;
}
p.demo { background-color:"white"; width:100px; margin:10px 0; font-family:Arial; }
</style>
</head>
<body link="#0563C1" vlink="#954F72" class=xl65 style="width:50%;">
<table border=0 cellpadding=0 cellspacing=0 width=auto ">
<tr height=20 >
<td height=20 class=xl65 width=64 style="height:15.0pt;width:48pt"></td>
<td colspan=12 rowspan=3 class=xl67 width=894 style="width:671pt"><font
class="font6">FORMULARIO DE CONOCIMIENTO DEL CLIENTE SECTOR ASEGURADOR<br>
COMISION NACIONAL DE BANCOS Y SEGUROS</font><font class="font5"><br>
(Con base a Resolución N° 1393/26-12-2007 y 184/12-02-2008)</font>
</td>
<td class=xl65 width=64 style="width:48pt"></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl65></td>
</tr>
<tr height=21 >
<td height=21 class=xl65 ></td>
</tr>
<tr height=20 style="height:15.0pt">
<td height=20 class=xl65 style="height:15.0pt"></td>
<td colspan=12 rowspan=2 class=xl138 style="border-right:1.0pt solid black;
border-bottom:.5pt solid black">Tipo de Relación:
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_0">
Radio</label>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_1">
Radio</label>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_2">
Radio</label>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_3">
Radio</label>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_4">
Radio</label>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_5">
Radio</label>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_6">
Radio</label>
<label>
<input type="radio" name="RadioGroup1" value="radio" id="RadioGroup1_7">
Radio</label>
</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=12 class=xl142 style="border-right:1.0pt solid black">I. DATOS
PERSONA NATURAL (Para personas juridicas serán las del Representante)
</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=3 class=xl144>Primer Apellido</td>
<td colspan=4 class=xl95 style="border-left:none">Segundo Apellido</td>
<td colspan=5 class=xl95 style="border-right:1.0pt solid black;border-left:
none">Nombres</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=3 class=xl87> </td>
<td colspan=4 class=xl79 style="border-left:none"> </td>
<td colspan=5 class=xl79 style="border-right:1.0pt solid black;border-left:
none"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=12 class=xl146 style="border-right:1.0pt solid black">Tipo de
Identificación
</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=2 rowspan=2 class=xl144>Número de Documento</td>
<td colspan=3 rowspan=2 class=xl95>Lugar y Fecha de Expedición</td>
<td colspan=3 rowspan=2 class=xl95>Fecha de Nacimiento</td>
<td colspan=2 rowspan=2 class=xl98 width=148 style="width:111pt">Lugar de
Nacimiento
</td>
<td colspan=2 rowspan=2 class=xl95 style="border-right:1.0pt solid black">Estado
Civil
</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=2 rowspan=3 class=xl87> </td>
<td colspan=3 rowspan=3 class=xl79> </td>
<td class=xl95 style="border-top:none;border-left:none">Día</td>
<td class=xl95 style="border-top:none;border-left:none">Mes</td>
<td class=xl95 style="border-top:none;border-left:none">Año</td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=2 class=xl79 style="border-right:1.0pt solid black;border-left:
none"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td rowspan=2 class=xl79 style="border-top:none"> </td>
<td rowspan=2 class=xl79 style="border-top:none"> </td>
<td rowspan=2 class=xl79 style="border-top:none"> </td>
<td colspan=4 class=xl95 style="border-right:1.0pt solid black;border-left:
none">Nombre del Cónyugue</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=4 class=xl79 style="border-right:1.0pt solid black;border-left:
none"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=2 class=xl144>Genero</td>
<td colspan=3 rowspan=2 class=xl95>Nacionalidad</td>
<td colspan=7 rowspan=2 class=xl95 style="border-right:1.0pt solid black">Profesión,
Oficio y Ocupación
</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl144 style="border-top:none">Masculino</td>
<td class=xl95 style="border-top:none;border-left:none">Femenino</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl87 style="border-top:none"> </td>
<td class=xl79 style="border-top:none;border-left:none"> </td>
<td colspan=3 class=xl79 style="border-left:none"> </td>
<td colspan=7 class=xl79 style="border-right:1.0pt solid black;border-left:
none"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=12 class=xl148 style="border-right:1.0pt solid black">Dirección
Residencia
</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=12 class=xl87 style="border-right:1.0pt solid black"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl144 style="border-top:none">Municipio</td>
<td colspan=2 class=xl95 style="border-left:none">Departamento</td>
<td colspan=2 class=xl95 style="border-left:none">Pais</td>
<td colspan=2 class=xl95 style="border-left:none">Telefono</td>
<td colspan=2 class=xl95 style="border-left:none">Celular</td>
<td colspan=3 class=xl95 style="border-right:1.0pt solid black;border-left:
none">Correo Electrónico</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td class=xl87 style="border-top:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=3 class=xl79 style="border-right:1.0pt solid black;border-left:
none"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=12 class=xl150 style="border-right:1.0pt solid black"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=3 class=xl144>Empresa donde trabaja</td>
<td colspan=3 class=xl95 style="border-left:none">Área</td>
<td colspan=3 class=xl95 style="border-left:none">Cargo</td>
<td colspan=3 class=xl94 style="border-right:1.0pt solid black;border-left:
none">Tiempo de Laborar</td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=3 class=xl87> </td>
<td colspan=3 class=xl79 style="border-left:none"> </td>
<td colspan=3 class=xl79 style="border-left:none"> </td>
<td colspan=3 class=xl79 style="border-right:1.0pt solid black;border-left:
none"> </td>
<td class=xl65></td>
</tr>
<tr height=20 >
<td height=20 class=xl65 ></td>
<td colspan=12 class=xl144 style="border-right:1.0pt solid black">Dirección
Laboral
</td>
<td class=xl65></td>
</tr>
<tr height=19 >
<td height=19 class=xl65 style="height:14.25pt"></td>
<td colspan=12 class=xl87 style="border-right:1.0pt solid black"> </td>
<td class=xl65></td>
</tr>
<tr height=19 >
<td height=19 class=xl65 style="height:14.25pt"></td>
<td class=xl144 style="border-top:none">Municipio</td>
<td colspan=2 class=xl95 style="border-left:none">Departamento</td>
<td colspan=2 class=xl95 style="border-left:none">Pais</td>
<td colspan=2 class=xl95 style="border-left:none">Telefono</td>
<td colspan=2 class=xl95 style="border-left:none">Fax</td>
<td colspan=3 class=xl95 style="border-right:1.0pt solid black;border-left:
none">Correo Electrónico</td>
<td class=xl65></td>
</tr>
<tr height=19 >
<td height=19 class=xl65 style="height:14.25pt"></td>
<td class=xl87 style="border-top:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=2 class=xl79 style="border-left:none"> </td>
<td colspan=3 class=xl79 style="border-right:1.0pt solid black;border-left:
none"> </td>
<td class=xl65></td>
</tr>
</table>
</body>
</html>
';
$filename="- formulario.pdf";
$codigoHTML=utf8_decode($codigoHTML);
$dompdf=new DOMPDF();
$dompdf->load_html($codigoHTML);
ini_set("memory_limit","128M");
$customPaper = array(0,0,360,360);
$dompdf->set_paper($customPaper);
$dompdf->render();
$pdf=$dompdf->output($filename);
file_put_contents("forms/".$filename, $pdf);
$mi_pdf = "forms/".$filename;
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="'.$mi_pdf.'"');
readfile($mi_pdf);
?>
Issue was on DOMPDF version.
To change the page size:
$customPaper = array(0,0,360,360);
$dompdf->set_paper($customPaper);

Table horizontal and vertical scroll with fixed header

i work in rails, i have a table and want to add horizontal and vertical scroll with fixed header, detail like that :
table have fixed width and high
table can horizontal and vertical scroll
headers are the first row, the last row and the first column
always see these headers above
when horizontal scroll, only the first column fixed
when vertical scroll, the first row and the last row fixed
This is my currenty code :
body {
font:16px Calibri;
}
table {
border-collapse:separate;
border-top: 3px solid orange;
}
td {
margin:0;
border:1px solid grey;
border-top-width:0px;
white-space:nowrap;
}
div.second {
width: 600px;
overflow-x:scroll;
overflow-y:visible;
margin-left:5em;
padding-bottom:1px;
height: auto;
}
div.first {
width: auto;
overflow-y: scroll;
overflow-x: hidden;
height: 150px;
padding-bottom: 1px;
position: absolute;
left:0;
top:auto;
}
.headcol {
position: absolute;
width:5em;
left:0;
top:auto;
border-right: 0px none black;
border-top-width:3px; /*only relevant for first row*/
margin-top:-3px; /*compensate for top border*/
background:grey;
}
.headrow {
position: absolute;
width:100px;
left: 5em;
}
.long {
background:yellow;
}
<div id="scroll-table">
<div class="first">
<div class="second">
<table>
<thead>
<tr>
<td class="headcol">1 - 1</td>
<div class="headrow">
<td>C1</td>
<td>C2</td>
<td>C3</td>
<td>C4</td>
<td>C5</td>
<td>C6</td>
<td>C7</td>
<td>C8</td>
</div>
</tr>
</thead>
<tbody>
<tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr>
<tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr>
<tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr>
<tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr><tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr>
<tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr><tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr>
<tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr><tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr>
<tr>
<td class="headcol">1</td>
<div class="row-content">
<td class="long">TYUIOPAS</td>
<td class="long">WERTYUOP</td>
<td class="long">QWEIOPAS</td>
<td class="long">QWEFGHJK</td>
<td class="long">QWERTYUI</td>
<td class="long">OPASDFGH</td>
<td class="long">TYUIOPAS</td>
<td class="long">UIOPASDF</td>
</div>
</tr>
</tbody>
</table>
</div>
</div>
</div>
I think to need to use javascript
Can you help me about it ?
Thanks

Scroll function make left contraction

I'm using following script for Fixed my menu when Scroll the page.
var num = 5;
$(window).bind('scroll', function () {
if ($(window).scrollTop() > num) {
$('.scroll').css({'position':'fixed', 'top':'0px'});
} else {
$('.scroll').css({'position':'', 'top':''});
}
});
I'm using this script for table. See Jsfiddle.
When Scroll Down, that title is going contraction to left left side.
Why It's happening and How I can fix?
It should support major browsers(not IE).
When you set position: fixed the left prop seems to be set to 0. Hence, the headers were moving to the left corner. You may have to play with display and width props to do what you're after. Also note that adding/removing a class is better than setting inline styles via .css(). Look at the following demo and adapt the code accordingly to suit your needs.
var num = 5;
$(document).bind('scroll', function () {
if ($(document).scrollTop() > num) {
$('.scroll').addClass("scrolled");
} else {
$('.scroll').removeClass("scrolled");
}
});
.scroll { width: 100%; }
.scroll th { width: 49% }
.scrolled { position: fixed; top: 0; }
.scrolled th { display: inline-block; width: 47.5% }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table id="mytable" width="100%">
<thead>
<tr class="scroll">
<th>Id</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
<tr>
<td align="center" width="20%">0</td>
<td align="center" width="20%">1</td>
</tr>
</tbody>
</table>
There may be other ways of doing it, but this is what I could quickly think of :)

onclick="parent.location='#CustomerInformation'" is working good in IE8 but not working firefox and other browser [duplicate]

This question already has answers here:
onclick="parent.location is not working in firefox and Chrome
(2 answers)
Closed 9 years ago.
GQM Order ID:
Current Status:
<TD class="bold" valign="top" nowrap align="left" width="7%">
Customer Name:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="customerLastName" />,<logic:write
name="orderBean" property="customerFirstName" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="7%">
Shared Customer Name:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="shrCustomerLastName" />,<logic:write
name="orderBean" property="shrCustomerFirstName" /> </TD>
</TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="7%">Customer
Email:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="emailAddr" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="7%">Shared Customer
Email:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="shrEmailaddr" /></TD> </TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="12%">Phone
Number:</TD>
<TD valign="top" nowrap align="left" width="13%"><logic:write
name="orderBean" property="phone" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="12%">Shared Phone
Number:</TD>
<TD valign="top" nowrap align="left" width="13%"><logic:write
name="orderBean" property="shrPhone" /></TD> </TR> </TBODY> </TABLE> </DIV> <DIV align="center"> <TABLE
class="PatientBar" height="18" cellspacing="0" cellpadding="0"
width="98%" border="0"> <TBODY> <TR><TD> </TD> </TR>
</TBODY> </TABLE> </DIV> <DIV align="center"> <TABLE
class="PatientBar" height="18" cellspacing="0" cellpadding="0"
width="98%" border="0"> <TBODY>
<TR>
<TD class="bold" valign="top" nowrap align="left" width="14%"></TD>
<TD valign="top" nowrap align="left" width="12%"></TD>
<TD class="bold" valign="top" nowrap align="left" width="14%"></TD>
<TD valign="top" nowrap align="left" width="12%"></TD>
<TD class="bold" valign="top" nowrap align="left" width="12%">NPT Order:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="nptInd" /></TD> </TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="14%">Affiliate:</TD>
<TD valign="top" nowrap align="left" width="12%"><logic:write
name="orderBean" property="affiliate" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="14%">Affiliate
Order ID:</TD>
<TD valign="top" nowrap align="left" width="12%"><logic:write
name="orderBean" property="vendorOrderId" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="12%">Fulfillment
Type:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="fulfillmentTypeDesc" /></TD> </TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="18%">Order
Placed Date/Time:</TD>
<TD valign="top" nowrap align="left" width="16%"><logic:write
name="orderBean" property="orderPlacedDttm"
format="MM/dd/yyyy h:mm a" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="18%">Promise
Date/Time:</TD>
<TD valign="top" nowrap align="left" width="16%"><logic:write
name="orderBean" property="promisedDttm" format="MM/dd/yyyy h:mm a"
nullValue="<%=WAConstants.NULL_VALUE_DATE%>" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="18%">Store
Number:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="storeNbr"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD> </TR>
<TR>
<TD class="bold" valign="top" nowrap align="left">
Pay Type:
</TD>
<TD valign="top" nowrap align="left">
<logic:write name="orderBean" property="payType" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
</TD>
<TD class="bold" valign="top" nowrap align="left">
Pod Location:
</TD>
<TD valign="top" nowrap align="left">
<logic:write name="orderBean" property="podLocation" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
</TD>
<TD class="bold" valign="top" nowrap align="left">
Envelope Id:
</TD>
<TD valign="top" nowrap align="left">
<logic:write name="orderBean" property="envelopeId" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
</TD>
</TR> </TBODY> </TABLE> </DIV>
<table> <TBODY> <tr>
<td height="1"></td> </tr> </TBODY> </table>
<logic:notEmpty name="orderBean"> <table class="TheBox"
cellspacing="0" cellpadding="0" align="center"> <TBODY>
<tr>
<td><wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_READ%>">
<input type="button" value="Refresh" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" onclick="onClickRefresh()">
</wa:permission> <logic:equal name="orderBean"
property="fulfillmentTypeCd"
value="<%=CodesDecodes.FULFILLMENT_TYPE_STORE%>">
<logic:notEqual name="orderBean" property="statusCd"
value="<%=CodesDecodes.ORDER_STATUS_CANCELLED%>">
<logic:notEqual name="orderBean" property="statusCd"
value="<%=CodesDecodes.ORDER_STATUS_SOLD%>">
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_CANCEL%>">
<INPUT type="button" value="Cancel Order" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Cancel Order"
onclick="onClickCancel()">
</wa:permission>
</logic:notEqual>
</logic:notEqual>
<%
if((String)session.getAttribute("isMobileVendor")=="true"){ %>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_RESEND%>">
<INPUT type="button" value="Resend Mobile Order" class="buttonSuper"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Resend Order" id = "Resend Order"
onclick="onClickResendMobile()">
</wa:permission>
<% } else{%>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_RESEND%>">
<INPUT type="button" value="Resend Order" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Resend Order" id = "Resend Order"
onclick="onClickResend()">
</wa:permission>
<%}%>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_RESEND%>">
<INPUT type="button" value="Resend Status" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Resend Status"
onclick="onClickResendStatus()">
</wa:permission>
</logic:equal> <wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_ERROR_DETAIL_READ%>">
<INPUT type="button" value="Error Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)"
onclick="onClickErrorDetail()">
</wa:permission>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_READ%>">
<INPUT type="button" value="Order Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="orderDetails"
onclick="onClickRefresh()">
</wa:permission> <INPUT type="button" value="Customer Details"
class="buttonSuper" onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="customerDetails"
style="" onclick="parent.location='#CustomerInformation'"> <INPUT
type="button" value="Status Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="statusDetails"
onclick="parent.location='#StatusInformation'"> <INPUT
type="button" value="Refund Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="refundDetails01"
onclick="parent.location='#RefundInformation'">
<input type="button" value="View Order URL's" class="buttonSuper"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" onclick="showOrderUrls();">
</td>
</tr> </TBODY> </table> </logic:notEmpty>
<table> <TBODY> <tr>
<td height="1"></td> </tr> </TBODY> </table>
<div id="mainContent" style="overflow: auto; width: auto; height:
auto"> <div class="error" id="errorText" style="display:
none"> This is where the error goes. Way to go on
generating an error.</div> <table class="SectionHeader1"
id="tableAddress"> <TBODY> <tr>
<td>Order Information</td> </tr> </TBODY> </table>
<table> <TBODY> <tr>
<td height="1"></td> </tr> </TBODY> </table>
<table class="TheBox"> <TBODY> <tr>
<td>
<DIV align="right">
<TABLE border="0" style="border-collapse: collapse" width="96%"
id="custInfoTable" class="BoxedIn" bgcolor="#ffffff">
<TBODY>
<TR>
<TH align="left" width="15%">WAG Customer Number:</TH>
<TH align="left" width="17%">Affiliate Customer ID:</TH>
<TH align="left" width="17%">Campaign ID:</TH>
<TH align="left" width="16%">PC+ Order ID:</TH>
<TH align="left" height="32" width="15%">Order Type:</TH>
</TR>
<TR class="onRow" id="custInfoTableR1">
<TD align="left" height="34" width="137"><logic:write
name="orderBean" property="walgreensCustomerId"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" height="34" width="163"><logic:write
name="orderBean" property="vendorCustomerId" /></TD>
<TD align="left" height="34" width="155"><logic:write
name="orderBean" property="campaignIdDesc"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" height="34" width="147"><logic:write
name="orderBean" property="pcpOrderId"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="137"><logic:write name="orderBean"
property="orderTypeDesc" /></TD>
</TR>
<TR class="onRow">
<TH align="left" height="32" width="17%">Last Four Digits of
Credit Card:</TH>
<TH align="left" height="32" width="17%">Credit Card Expiration
(MM/YY):</TH>
<TH align="left" height="32" width="16%">Shipping Method:</TH>
<TH align="left" height="32" width="169">Carrier:</TH>
<TH align="left" height="32" width="169">Tracking Number:</TH>
</TR>
<TR class="onRow">
<TD align="left" width="163"><logic:write name="orderBean"
property="creditCardNbrL4c"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="155"><logic:write name="orderBean"
property="creditCardExpiration"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="147"><logic:write name="orderBean"
property="shipToMethodDesc"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="169"><logic:write name="orderBean"
property="carrierDesc"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="169"><logic:write name="orderBean"
property="trackingNbr"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TH align="left" width="15%">Created By:</TH>
<TH align="left" width="17%">Create Date/Time:</TH>
<TH align="left" width="17%">Last Updated By:</TH>
<TH align="left" width="16%">Update Date/Time:</TH>
<TD align="left" bgcolor="#ffffff"></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" height="17" width="137"><logic:write
name="orderBean" property="createUserId" /></TD>
<TD align="left" height="17" width="163"><logic:write
name="orderBean" property="createDttm"
format="MM/dd/yyyy h:mm a" /></TD>
<TD align="left" height="17" width="155"><logic:write
name="orderBean" property="updateUserId"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" height="17" width="147"><logic:write
name="orderBean" property="updateDttm"
format="MM/dd/yyyy h:mm a"
nullValue="<%=WAConstants.NULL_VALUE_DATE%>" /></TD>
<TD align="left" height="17" bgcolor="#ffffff"></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</td> </tr> </TBODY> </table>
<TABLE class="TheBox" align="center"> <TBODY> <tr>
<td>
<fieldset><legend>Order Items</legend> <logic:define
id="orderItemList" name="orderBean" property="orderItemList"
scope="session" /> <wa:dbgrid id="orderItemGrid"
listBean="orderItemList" cssClass="BoxedIn" indice="i">
<wa:textcolumn dataField="gqmProductId"
headerText="GQM Product ID:" sortable="false" HAlign="left"
width="13%" />
<wa:textcolumn dataField="productDesc"
headerText="Product Description:" sortable="false" HAlign="left"
width="13%" />
<wa:textcolumn dataField="productQty"
headerText="Product Quantity:" sortable="false" HAlign="left"
width="8%" />
<wa:textcolumn dataField="unitPrice" headerText="Unit Price:"
sortable="false" HAlign="left" width="8%" dataFormat="$#,##0.00#" />
<wa:textcolumn dataField="productPriceBeforeDiscount"
headerText="Total Price before discount:" sortable="false"
HAlign="left" width="13%" dataFormat="$#,##0.00#" />
<wa:textcolumn dataField="productDiscountTotal"
headerText="Total Discount:" sortable="false" HAlign="left"
width="13%" dataFormat="$#,##0.00#" />
<wa:textcolumn dataField="productTotal" headerText="Item Total:"
sortable="false" HAlign="left" width="13%" dataFormat="$#,##0.00#" />
</wa:dbgrid>
<table>
<TBODY>
<tr>
<td height="1"></td>
</tr>
</TBODY>
</table>
<TABLE id="referralTable" class="BoxedIn" align="left">
<TBODY>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%">Sub
Total Price:</TD>
<TD bgcolor="#ffffff" height="21" width="13%"><logic:write
name="orderBean" property="subTotalPrice" format="$#,##0.00#" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Total Order
Discount:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="totalOrderDiscount" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Order Freight:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="orderFreight" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Order Tax:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="orderTax" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Order Total:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="orderTotal" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
</TBODY>
</TABLE>
</fieldset>
</td> </tr> </TBODY> </TABLE>
<table class="TheBox" align="center"> <TBODY> <tr>
<td>
<fieldset><legend>Order Promotions </legend>
<div align="center"><logic:define id="orderPromotionList"
name="orderBean" property="orderPromotionList" scope="session" />
<wa:dbgrid id="orderPromotionGrid" listBean="orderPromotionList"
cssClass="BoxedIn" indice="i">
<wa:textcolumn dataField="pluNbr" headerText="PLU Number:"
sortable="false" HAlign="left" width="13%" />
<wa:textcolumn dataField="pluDesc" headerText="PLU Description:"
sortable="false" HAlign="left" width="13%" />
<wa:textcolumn dataField="qtyApplied"
headerText="Quantity Applied:" sortable="false" HAlign="left"
width="13%" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
<wa:textcolumn dataField="TotalDiscount"
headerText="Total Discount:" sortable="false" HAlign="left"
width="13%" dataFormat="$#,##0.00#" />
</wa:dbgrid></div>
</fieldset>
</td> </tr> </TBODY> </table>
<A NAME="CustomerInformation"></A> <table class="SectionHeader1">
<TBODY> <tr>
<td>Customer Information</td> </tr> </TBODY> </table>
<TABLE class="TheBox" align="center">
<logic:define id="orderAddressBeanBilling" name="orderBean"
property="orderAddressBeanBilling" scope="session" />
<logic:define id="orderAddressBeanShipping" name="orderBean"
property="orderAddressBeanShipping" scope="session" />
<TBODY> <TR>
<TD>
<FIELDSET><LEGEND>Customer Address</LEGEND>
<DIV align="center">
<TABLE id="table5" class="BoxedIn">
<TBODY>
<TR>
<TH colspan="3" width="50%">Billing Address</TH>
<TH colspan="5" width="50%">Shipping Address</TH>
</TR>
<TR class="onRow" id="table5R1">
<TD align="left" height="29" colspan="3" width="473">
<DIV id="table5R1E2"><logic:notEmpty
name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling" property="lastName" />
<logic:write name="orderAddressBeanBilling" property="firstName" />
</logic:notEmpty></DIV>
<DIV id="table5R1E2"><logic:notEmpty
name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling"
property="streetAddr" />
</logic:notEmpty></DIV>
<logic:notEmpty name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling" property="city" />, <logic:write
name="orderAddressBeanBilling" property="state" />
<logic:write name="orderAddressBeanBilling" property="zipCode" />
</logic:notEmpty>
<DIV id="table5R2E2"><logic:notEmpty
name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling" property="countryCd" />
</logic:notEmpty></DIV>
</TD>
<TD align="left" height="29" colspan="5" width="469">
<DIV id="table5R1E20"><logic:notEmpty
name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping" property="lastName" />
<logic:write name="orderAddressBeanShipping"
property="firstName" />
</logic:notEmpty></DIV>
<DIV id="table5R1E20"><logic:notEmpty
name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping"
property="streetAddr" />
</logic:notEmpty></DIV>
<logic:notEmpty name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping" property="city" />, <logic:write
name="orderAddressBeanShipping" property="state" />
<logic:write name="orderAddressBeanShipping" property="zipCode" />
</logic:notEmpty>
<DIV id="table5R2E21"><logic:notEmpty
name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping"
property="countryCd" />
</logic:notEmpty></DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</FIELDSET>
</TD> </TR> </TBODY> </TABLE>
I tried like window.location,document.location, any many way..bt dnt
know what is error.The '#CustomerInformation' denotes the point
where this script will jump to same page but it is not working
firefox.
Use
<button>Customer Details</button>
Its silly to involve Javascript in something this simple.
As Pointy points out, it may not really be valid. But its better than what you're doing.
Really, it should be
Customer Details

Categories