Table Alignment Issues HTML JavaScript - javascript

I don't know how this is going to work because, it is not a live website, it is a dashboard that pulls data from a chemical analysis program and give a browser view of it. My issue is I have two tables I need aligned at the top of the page. One aligned to the left and one centered. Right now I have a table with an image logo.gif aligned center then below it I have a table meaning/symbol headers aligned to the left I need those on the same line can anyone show me what to do? I can email a picture if need to be see what it looks like. I know there is a lot of broken tags, but I inherited this and it all works except for the two tables on top.
<div align="center">
<table border="0" width="800" id="Nav" cellpadding="0" cellspacing="0" valign="top" >
<tr>
<td height="60" width="100%"><p align="center"><img border="0" src="../Images/Logo.jpg" width="199" height="101"></td>
</tr>
<tr>
<td width="100%" bordercolorlight="#FFFFFF" bordercolordark="#808080" align="center" valign="top">
<TABLE BORDER=2 width="23%" align="left" id="BodyTable" height="20" cellspacing="0" cellpadding="0" bordercolor="#000000">
<TR> <TH>Meaning</TH> <TH>Symbol</TH> </TR>
<TR> <TD><b>No Schedule</TD> <TD align="center"><img src='../Images/Not- ScheduledMain2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Deactivated Tanks</TD> <TD align="center"><img src='../Images/Gray-Astris2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Test Scheduled</TD> <TD align="center"> <img src='../Images/BlueTest2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Test In Process</TD> <TD align="center"><img src='../Images/GreenTest2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Test Late</TD> <TD align="center"> <img src='../Images/RedTest2.png' width='20' height='22' align='center'></TD></TR>
<tr>
</TABLE>
</tr>
<tr>
<td width="100%" bordercolorlight="#FFFFFF" bordercolordark="#808080" align="center" valign="top">
<table border="0" width="100%" id="HeaderTable" cellspacing="0" cellpadding="0" valign="top" height="73">
<tr>
<td colspan="3" height="34"><p align="center"><b><font face="Arial" size="5">IEC's TrueLogic Dashboard</font></b></td>
</tr>
<tr>
<td colspan="3" height="39"><p align="center">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="340" width="110%" bordercolorlight="#FFFFFF" bordercolordark ="#808080" align="center" valign="top">
<table border="0" width="100%" id="BodyTable" height="20" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
<tr>
<td height='20' width='20' bgcolor="#C0C0C0" ><p align='center'> </td>
<td width='14'> <td>
<td height='20' width='360' bgcolor="#C0C0C0" ><p align='center'><a><b>Process Line</b></td>
<!-- Sample Item Removed <td height='10' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Sample</b></td>
--> <td width='14'> <td>
<td height='20' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Test Status</b></td>
<td width='14'> <td>
<td height='20' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Adds</b></td>
<td width='14'> <td>
<td height='20' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Corrective Action</b></td>
</tr>
</Table>
<table border="0" width="100%" id="BodyTable" height="37" cellspacing="0" cellpadding="0" valign="top">
<script type="text/javascript">[ItemsHTML]
</script>
</table>
</td>
</tr>
<tr>
<td HEIGHT="25"></td>
</tr>
<tr>
<td height="25">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr>
</tr>
<td width="335"><p align="left"><font size="1"> <p> By TrueLogic Company <p> Edited By International Electronic Components</font></td>
<td width="290"><p align="center"></td>
<td width="135"><p align="right"><font size="1">[LastBuild]</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td HEIGHT="25"></td>
</td>
</tr>
</table>
</div>
</body>
</html>

Is this what you want ?
<div align="center">
<table border="0" width="800" id="Nav" cellpadding="0" cellspacing="0" valign="top" >
<tr>
<td height="60" width="100%" align="center">
<TABLE style="float:left;" BORDER=2 width="23%" align="left" id="BodyTable" height="20" cellspacing="0" cellpadding="0" bordercolor="#000000">
<TR> <TH>Meaning</TH> <TH>Symbol</TH> </TR>
<TR> <TD><b>No Schedule</TD> <TD align="center"><img src='../Images/Not- ScheduledMain2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Deactivated Tanks</TD> <TD align="center"><img src='../Images/Gray-Astris2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Test Scheduled</TD> <TD align="center"> <img src='../Images/BlueTest2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Test In Process</TD> <TD align="center"><img src='../Images/GreenTest2.png' width='20' height='22' align='center'></TD> </TR>
<TR> <TD><b>Test Late</TD> <TD align="center"> <img src='../Images/RedTest2.png' width='20' height='22' align='center'></TD></TR>
<tr>
</TABLE>
<img border="0" src="../Images/Logo.jpg" width="199" height="101">
</td>
</tr>
<tr>
<td width="100%" bordercolorlight="#FFFFFF" bordercolordark="#808080" align="center" valign="top">
<table border="0" width="100%" id="HeaderTable" cellspacing="0" cellpadding="0" valign="top" height="73">
<tr>
<td colspan="3" height="34"><p align="center"><b><font face="Arial" size="5">IEC's TrueLogic Dashboard</font></b></td>
</tr>
<tr>
<td colspan="3" height="39"><p align="center">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="340" width="110%" bordercolorlight="#FFFFFF" bordercolordark ="#808080" align="center" valign="top">
<table border="0" width="100%" id="BodyTable" height="20" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
<tr>
<td height='20' width='20' bgcolor="#C0C0C0" ><p align='center'> </td>
<td width='14'> <td>
<td height='20' width='360' bgcolor="#C0C0C0" ><p align='center'><a><b>Process Line</b></td>
<!-- Sample Item Removed <td height='10' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Sample</b></td>
--> <td width='14'> <td>
<td height='20' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Test Status</b></td>
<td width='14'> <td>
<td height='20' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Adds</b></td>
<td width='14'> <td>
<td height='20' width='120' bgcolor="#C0C0C0" ><p align='center'><a><b>Corrective Action</b></td>
</tr>
</Table>
<table border="0" width="100%" id="BodyTable" height="37" cellspacing="0" cellpadding="0" valign="top">
<script type="text/javascript">[ItemsHTML]
</script>
</table>
</td>
</tr>
<tr>
<td HEIGHT="25"></td>
</tr>
<tr>
<td height="25">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<tr>
</tr>
<td width="335"><p align="left"><font size="1"> <p> By TrueLogic Company <p> Edited By International Electronic Components</font></td>
<td width="290"><p align="center"></td>
<td width="135"><p align="right"><font size="1">[LastBuild]</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td HEIGHT="25"></td>
</td>
</tr>
</table>
</div>
</body>
</html>

Related

Unable to select table inside a table in jquery

I am currently having problem selecting table inside table using jquery what i want is to select the second table inside the table as given in HTML code below. I have tried the following jquery code but when i use it adds the first tr with style="display:none;" as i wrote it down below to show the tr it selects but rather i want to select the third table tr. can anyone please help me select the right table.
Here is what i tried:
<script>
$(document).ready(function () {
$("table td:contains('NIL')").closest("tr").hide();
});
</script>
<table width="79%" border="0" cellpadding="0" cellspacing="0" height="350">
<tr style="display:none;">
<td valign="top" width="1%" bgcolor=#FFFFFF>
</td>
<td valign="top" width="78%" bgcolor=#FFFFFF>
<center>
<br><b><u>COURSE PAGE - Winter Semester 2015~16</u></b><br /><br />
<table cellspacing='0' cellpadding='4' align='center' border='1' width='95%' style='border-collapse: collapse;' bordercolor='black'>
<tr align=center bgcolor=#5A768D>
<td width=80><font color=#FFFFFF>Course Owner</font></td>
<td width=70><font color=#FFFFFF>Course Code</font></td>
<td><font color=#FFFFFF>Course Title</font></td>
<td><font color=#FFFFFF>Course Type</font></td>
<td><font color=#FFFFFF>Faculty</font></td>
<td><font color=#FFFFFF>Class Nbr(s)</font></td>
<td><font color=#FFFFFF>Slot(s)</font></td>
</tr>
<tr bgcolor='#E1ECF2'>
<td width=80 align=center>SITE</td>
<td width=70 align=center>ITE302</td>
<td>Database Systems</td>
<td>Embedded Lab</td>
<td>11543 - SARAVANAKUMAR K - SITE</td>
<td>2039</td>
<td>L29+L30</td>
</tr>
</table><br>
<table cellspacing='0' cellpadding='4' width="95%" align='center' border='1' style='border-collapse: collapse;' bordercolor='black' height="61">
<tr>
<td bgcolor=#5A768D width="22%" height="30"><font color=#FFFFFF>Syllabus</font></td>
<form action='syllabus_file.asp' method='post'><td bgcolor='#EDEADE' width='75%' height='30'><input type='hidden' name='crscd' value='ITE302'><input type='hidden' name='crstp' value='ELA'><input type='hidden' name='version' value='1'><input type='submit' name='sybcmd' class='submit' value='Download'></td></form>
</tr>
<tr>
<td bgcolor=#5A768D width="22%" height="30" rowspan=5 valign=top>
<font color=#FFFFFF>Text/Reference Material</font>
</td>
<td bgcolor='#EDEADE' width="75%" height="30">
<a href='https://academics.vit.ac.in/faculty/Syllabus_Textbook/WINSEM2015-16_CP1673_TB01_DBMS_Lab_Manual.pdf' target='_blank'><font color=blue>DBMS_Lab_Manual.pdf</font></a>
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
<a href='https://academics.vit.ac.in/faculty/Syllabus_Textbook/WINSEM2015-16_CP1673_TB02_Structured-Query-Language.pdf' target='_blank'><font color=blue>Structured-Query-Language.pdf</font></a>
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
<a href='https://academics.vit.ac.in/faculty/Syllabus_Textbook/WINSEM2015-16_CP1673_TB03_students_manual.pdf' target='_blank'><font color=blue>students_manual.pdf</font></a>
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
NIL
</td>
</tr>
</table><br>
<table cellspacing='0' cellpadding='4' width="95%" align='center' border='1' style='border-collapse: collapse;' bordercolor='black' height="61">
<tr>
<td bgcolor=#5A768D width="22%" height="30" rowspan=5 valign=top>
<font color=#FFFFFF>Assignments</font>
</td>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
</table><br>
Since you are targetting td of a table inside td, you need to specify table inside table as below:
$("table table td:contains('NIL')").closest("tr").hide();
or to be precise table inside td as:
$("table td table td:contains('NIL')").closest("tr").hide();
Otherwise your condition will satisfy always at very first instance and it will hide the root tr since there is NIL in table which is inside td
Make a note - I don't understand why you have added display:none; on the very first tr and I've removed that.
Sinppet
$("table table td:contains('NIL')").closest("tr").hide();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table width="79%" border="0" cellpadding="0" cellspacing="0" height="350">
<tr>
<td valign="top" width="1%" bgcolor=#FFFFFF>
</td>
<td valign="top" width="78%" bgcolor=#FFFFFF>
<center>
<br><b><u>COURSE PAGE - Winter Semester 2015~16</u></b>
<br />
<br />
<table cellspacing='0' cellpadding='4' align='center' border='1' width='95%' style='border-collapse: collapse;' bordercolor='black'>
<tr align=center bgcolor=#5A768D>
<td width=80><font color=#FFFFFF>Course Owner</font>
</td>
<td width=70><font color=#FFFFFF>Course Code</font>
</td>
<td><font color=#FFFFFF>Course Title</font>
</td>
<td><font color=#FFFFFF>Course Type</font>
</td>
<td><font color=#FFFFFF>Faculty</font>
</td>
<td><font color=#FFFFFF>Class Nbr(s)</font>
</td>
<td><font color=#FFFFFF>Slot(s)</font>
</td>
</tr>
<tr bgcolor='#E1ECF2'>
<td width=80 align=center>SITE</td>
<td width=70 align=center>ITE302</td>
<td>Database Systems</td>
<td>Embedded Lab</td>
<td>11543 - SARAVANAKUMAR K - SITE</td>
<td>2039</td>
<td>L29+L30</td>
</tr>
</table>
<br>
<table cellspacing='0' cellpadding='4' width="95%" align='center' border='1' style='border-collapse: collapse;' bordercolor='black' height="61">
<tr>
<td bgcolor=#5A768D width="22%" height="30"><font color=#FFFFFF>Syllabus</font>
</td>
<form action='syllabus_file.asp' method='post'>
<td bgcolor='#EDEADE' width='75%' height='30'>
<input type='hidden' name='crscd' value='ITE302'>
<input type='hidden' name='crstp' value='ELA'>
<input type='hidden' name='version' value='1'>
<input type='submit' name='sybcmd' class='submit' value='Download'>
</td>
</form>
</tr>
<tr>
<td bgcolor=#5A768D width="22%" height="30" rowspan=5 valign=top>
<font color=#FFFFFF>Text/Reference Material</font>
</td>
<td bgcolor='#EDEADE' width="75%" height="30">
<a href='https://academics.vit.ac.in/faculty/Syllabus_Textbook/WINSEM2015-16_CP1673_TB01_DBMS_Lab_Manual.pdf' target='_blank'><font color=blue>DBMS_Lab_Manual.pdf</font></a>
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
<a href='https://academics.vit.ac.in/faculty/Syllabus_Textbook/WINSEM2015-16_CP1673_TB02_Structured-Query-Language.pdf' target='_blank'><font color=blue>Structured-Query-Language.pdf</font></a>
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
<a href='https://academics.vit.ac.in/faculty/Syllabus_Textbook/WINSEM2015-16_CP1673_TB03_students_manual.pdf' target='_blank'><font color=blue>students_manual.pdf</font></a>
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="75%" height="30">
NIL
</td>
</tr>
</table>
<br>
<table cellspacing='0' cellpadding='4' width="95%" align='center' border='1' style='border-collapse: collapse;' bordercolor='black' height="61">
<tr>
<td bgcolor=#5A768D width="22%" height="30" rowspan=5 valign=top>
<font color=#FFFFFF>Assignments</font>
</td>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
<tr>
<td bgcolor='#EDEADE' width="76%" height="30">
NIL
</td>
</tr>
</table>
<br>

Jquery and CSS add on HTML code

The following snippet is showing some changes i want to do to an html table, if the grade is greater or equal than 5 it should put a red line over the course.
But i want to do it ONLY for the course name (for example Physics)
and not for the hole line.
Could someone tell me what is my mistake here? Because i cant figure it out.
Thanks a lot!
$('.topBorderLight').each(function(){
var $this = $(this);
var text = $this.text();
text = text.replace(',', '.');
var grade = Number(text);
if(!isNaN(grade)) {
$this.closest('tr').toggleClass('gradeOver5', grade >= 5);
}
});
.gradeOver5,
.gradeOver5 td {
color: red;
text-decoration: line-through;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<tr>
<td colspan="2">
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="10" class="groupHeader">Semester A</td>
</tr>
<tr height="25" class="italicHeader">
<td valign="top"></td>
<td colspan="2" valign="top">Course</td>
<td valign="top">Type</td>
<td valign="top">SM</td>
<td valign="top">Hours</td>
<td valign="top">ECTS</td>
<td valign="top">GRADE</td>
<td valign="top">Exam</td>
</tr>
<tr height="25" bgcolor="#fafafa">
<td valign="top"> <img align="absbottom" src="images/course4.gif" width="16"/></td>
<td colspan="2" valign="top" class="topBorderLight">(Ν2-1011) PHYSICS<span class="redfonts"></span></td>
<td valign="top" class="topBorderLight">COMPULSORY</td>
<td valign="top" class="topBorderLight"> 6</td>
<td valign="top" class="topBorderLight">6</td>
<td valign="top" class="topBorderLight"> 7</td>
<td valign="top" class="topBorderLight"><span class="redFonts">5</span></td>
<td nowrap="true" class="topBorderLight"><span class="tablecell"><i>Α WINTER
2012-2013</i></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="10" class="groupHeader">Semester A</td>
</tr>
<tr height="25" class="italicHeader">
<td valign="top"></td>
<td colspan="2" valign="top">Course</td>
<td valign="top">Type</td>
<td valign="top">SM</td>
<td valign="top">Hours</td>
<td valign="top">ECTS</td>
<td valign="top">GRADE</td>
<td valign="top">Exam</td>
</tr>
<tr height="25" bgcolor="#fafafa" class="gradeOver5">
<td valign="top"> <img align="absbottom" src="images/course1.gif" width="16"></td>
<td colspan="2" valign="top" class="topBorderLight">(Ν2-4021) PRO<span class="redfonts"></span></td>
<td valign="top" class="topBorderLight">COMPULSORY</td>
<td valign="top" class="topBorderLight"> 4</td>
<td valign="top" class="topBorderLight">4</td>
<td valign="top" class="topBorderLight"> 4</td>
<td valign="top" class="topBorderLight"><span class="redFonts">7.5</span></td>
<td nowrap="true" class="topBorderLight"><span class="tablecell"><i>A WINTER
2014-2015</i></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="10" class="groupHeader">Semester A</td>
</tr>
<tr height="25" class="italicHeader">
<td valign="top"></td>
<td colspan="2" valign="top">Course</td>
<td valign="top">Type</td>
<td valign="top">SM</td>
<td valign="top">Hours</td>
<td valign="top">ECTS</td>
<td valign="top">GRADE</td>
<td valign="top">Exam</td>
</tr>
<tr height="25" bgcolor="#fafafa" class="gradeOver5">
<td valign="top"> <img align="absbottom" src="images/course1.gif" width="16"></td>
<td colspan="2" valign="top" class="topBorderLight">(Ν2-4021) SAE1<span class="redfonts"></span></td>
<td valign="top" class="topBorderLight">COMPULSORY</td>
<td valign="top" class="topBorderLight"> 4</td>
<td valign="top" class="topBorderLight">4</td>
<td valign="top" class="topBorderLight"> 6</td>
<td valign="top" class="topBorderLight"><span class="redFonts">2.5</span></td>
<td nowrap="true" class="topBorderLight"><span class="tablecell"><i>A WINTER
2014-2015</i></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
You need to change the CSS selector to target the second td only:
.gradeOver5 td:nth-child(2) {
color: red;
text-decoration: line-through;
}
$('.topBorderLight').each(function() {
var $this = $(this);
var text = $this.text();
text = text.replace(',', '.');
var grade = Number(text);
if (!isNaN(grade)) {
$this.closest('tr').toggleClass('gradeOver5', grade >= 5);
}
});
.gradeOver5 td:nth-child(2) {
color: red;
text-decoration: line-through;
}
<tr>
<td colspan="2">
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="10" class="groupHeader">Semester A</td>
</tr>
<tr height="25" class="italicHeader">
<td valign="top"></td>
<td colspan="2" valign="top">Course</td>
<td valign="top">Type</td>
<td valign="top">SM</td>
<td valign="top">Hours</td>
<td valign="top">ECTS</td>
<td valign="top">GRADE</td>
<td valign="top">Exam</td>
</tr>
<tr height="25" bgcolor="#fafafa">
<td valign="top">
<img align="absbottom" src="images/course4.gif" width="16" />
</td>
<td colspan="2" valign="top" class="topBorderLight">(Ν2-1011) PHYSICS<span class="redfonts"></span>
</td>
<td valign="top" class="topBorderLight">COMPULSORY</td>
<td valign="top" class="topBorderLight">6</td>
<td valign="top" class="topBorderLight">6</td>
<td valign="top" class="topBorderLight">7</td>
<td valign="top" class="topBorderLight"><span class="redFonts">5</span>
</td>
<td nowrap="true" class="topBorderLight"><span class="tablecell"><i>Α WINTER
2012-2013</i></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="10" class="groupHeader">Semester A</td>
</tr>
<tr height="25" class="italicHeader">
<td valign="top"></td>
<td colspan="2" valign="top">Course</td>
<td valign="top">Type</td>
<td valign="top">SM</td>
<td valign="top">Hours</td>
<td valign="top">ECTS</td>
<td valign="top">GRADE</td>
<td valign="top">Exam</td>
</tr>
<tr height="25" bgcolor="#fafafa" class="gradeOver5">
<td valign="top">
<img align="absbottom" src="images/course1.gif" width="16">
</td>
<td colspan="2" valign="top" class="topBorderLight">(Ν2-4021) PRO<span class="redfonts"></span>
</td>
<td valign="top" class="topBorderLight">COMPULSORY</td>
<td valign="top" class="topBorderLight">4</td>
<td valign="top" class="topBorderLight">4</td>
<td valign="top" class="topBorderLight">4</td>
<td valign="top" class="topBorderLight"><span class="redFonts">7.5</span>
</td>
<td nowrap="true" class="topBorderLight"><span class="tablecell"><i>A WINTER
2014-2015</i></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="10" class="groupHeader">Semester A</td>
</tr>
<tr height="25" class="italicHeader">
<td valign="top"></td>
<td colspan="2" valign="top">Course</td>
<td valign="top">Type</td>
<td valign="top">SM</td>
<td valign="top">Hours</td>
<td valign="top">ECTS</td>
<td valign="top">GRADE</td>
<td valign="top">Exam</td>
</tr>
<tr height="25" bgcolor="#fafafa" class="gradeOver5">
<td valign="top">
<img align="absbottom" src="images/course1.gif" width="16">
</td>
<td colspan="2" valign="top" class="topBorderLight">(Ν2-4021) SAE1<span class="redfonts"></span>
</td>
<td valign="top" class="topBorderLight">COMPULSORY</td>
<td valign="top" class="topBorderLight">4</td>
<td valign="top" class="topBorderLight">4</td>
<td valign="top" class="topBorderLight">6</td>
<td valign="top" class="topBorderLight"><span class="redFonts">2.5</span>
</td>
<td nowrap="true" class="topBorderLight"><span class="tablecell"><i>A WINTER
2014-2015</i></span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
Alternatively, you can amend the JS to only apply that class to the required td instead of the tr:
$this.closest('tr').find('td:eq(2)').toggleClass('gradeOver5', grade >= 5);
It looks like you need to toggle the class on td not on tr.
if(!isNaN(grade)) {
$this.closest('td').toggleClass('gradeOver5', grade >= 5);
}

Jquery using class in table get data for google dynamic remarketing tag

Im trying to pull out the data and put it in arrays with jquery for google dynamic remarketing tag.
using the css class
gr_row
values---
ecomm_prodid
ecomm_quantity
ecomm_totalvalue
Then insert them like so, if there are multiple values, if only one then no array and remove curreny symbol.
<!-multiple products in cart-->
<script type="text/javascript">
var google_tag_params =
ecomm_prodid: ["123","234"],
ecomm_pagetype: "basket",
ecomm_totalvalue: [100,50]
};
</script>
<!-single product in cart-->
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: 234,
ecomm_pagetype: "purchase",
ecomm_totalvalue: 120.99
};
</script>
Any help appreciated thanks
google instructions add dynamic remarketing tag
<table class="checkout-cart" border="0" cellpadding="3" cellspacing="2" width="650">
<tbody>
<tr>
<th "="" align="left" width="15%">REF</th>
<th align="left" width="45%">DESCRIPTION</th>
<th align="right" width="10%">QUANTITY</th>
<th align="right" width="10%">PRICE</th>
<th align="right" width="10%">COST</th>
<th align="center" width="10%">REMOVE</th>
</tr>
<tr class ="gr_row">
<td colspan="3" class="cart"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="ecomm_prodid" width="77"> 83 </td>
<td valign="middle" width="43"><actinic:thumbnail></actinic:thumbnail></td>
<td width="242">some product</td>
<td align="right" class="ecomm_quantity" width="87"><input size="4" name="Q_0" value="1" style="text-align: right;" type="TEXT"></td>
</tr>
</tbody>
</table></td>
<td align="right" class="ecomm_totalvalue"> £5.79 </td>
<td align="right" class="ecomm_totalvalue"> £5.79 </td>
<td rowspan="1" class="cart" align="center"><input name="D_0" type="CHECKBOX"></td>
</tr>
<tr>
<td colspan="3" class="cart"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td class="ecomm_prodid" width="78"> 3571 </td>
<td valign="middle" width="43"><actinic:thumbnail></actinic:thumbnail></td>
<td width="241">another product</td>
<td align="right" class="ecomm_quantity" width="87"><input size="4" name="Q_1" value="5" style="text-align: right;" type="TEXT"></td>
</tr>
</tbody>
</table></td>
<td class="cart" align="right"> £6.90 </td>
<td class="cart" align="right"> £6.90 </td>
<td rowspan="1" class="cart" align="center"><input name="D_1" type="CHECKBOX"></td>
</tr>
<tr>
<td colspan="4" align="right"><b>Subtotal</b></td>
<td class="cart" align="right">£12.69</td>
<td rowspan="NETQUOTEVAR:REMOVEROWSPAN" align="center"> </td>
</tr>
<tr>
<td colspan="4" align="right"><b>VAT</b></td>
<td class="cart" align="right">£2.54</td>
<td rowspan="NETQUOTEVAR:REMOVEROWSPAN" align="center"> </td>
</tr>
<tr>
<td colspan="4" align="right"><b>Total</b></td>
<td class="cartheading" align="right"><b>£15.23</b></td>
<td rowspan="NETQUOTEVAR:REMOVEROWSPAN" align="center"> </td>
</tr>
</tbody>
</table>

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

Asp page not running in firefox or chrome

I have a classic asp page which is working on IE and safari but not in firefox or chrome. Have a look at this url
Check it
My Asp Page code is
<HTML>
<HEAD>
<TITLE>USER LOGIN</TITLE>
<script language="JavaScript">
<!--
function SetFocus() {
var field = document.forms("Form1").item("txtUserID");
field.select();
field.focus();
}
//-->
</script>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<style>
.v8Blue{ font-family:Verdana; font-size:8pt; color:#1E3B51;}
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="75%" border="0" align="center">
<tr>
<td height="80"> </td>
</tr>
<tr>
<td align="center">
<%
' Check if User has previously rejected by the Server for invalid Log On
If Session("RequestLogOnSuccess_Delphi") = "NO" then
Response.Write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
Response.Write "<tr>"
Response.Write "<td align='center'><font face='Arial, Verdana, Times New Roman' size='2' color='#CC0000'>YOUR LOG ON IS INVALID. PLEASE TRY AGAIN.</font></td>"
Response.Write "</tr>"
Response.Write "</table>"
else
Response.Write "<p> </p>"
End if
%>
</td>
</tr>
</table>
<form method="post" action="../Request_WebProcess/Request_LogOn_Process.asp" name="Form1">
<table width=23% border=0 cellpadding=0 cellspacing=0 align="center" height="119">
<tr>
<td colspan=7> <img src="images/login_01.jpg" width=370 height=58 alt=""></td>
</tr>
<tr>
<td width="35" rowspan=4> <img src="images/login_03.jpg" width=35 height=83 alt=""></td>
<td colspan=2>
<div align="center">
<input name="txtUserID" type="text" class="v8blue" id="username" size="15">
</div>
</td>
<td width="12" rowspan=2> <img src="images/login_05.jpg" width=12 height=27 alt=""></td>
<td colspan=2>
<div align="center">
<input name="txtPassword" type="password" class="v8blue" id="password" size="15">
</div>
</td>
<td width="64" rowspan=4> <img src="images/login_07.jpg" width=54 height=83 alt=""></td>
</tr>
<tr>
<td colspan=2> <img src="images/login_08.jpg" width=133 height=4 alt=""></td>
<td colspan=2> <img src="images/login_09.jpg" width=136 height=4 alt=""></td>
</tr>
<tr>
<td width="100" rowspan=2> <img src="images/login_10.jpg" width=100 height=56 alt=""></td>
<td colspan=3> <img src="images/login_11.jpg" name="Image19" width="82" height="30" border="0" onClick="document.forms('Form1').submit()"></td>
<td width="99" rowspan=2> <img src="images/login_12.jpg" width=99 height=55 alt=""></td>
</tr>
<tr>
<td colspan=3 height="21"> <img src="images/login_13.jpg" width=82 height=26 alt=""></td>
</tr>
<tr>
<td colspan=7 height="2"> <img src="images/login_14.jpg" width=370 height=20 alt=""></td>
</tr>
<tr>
<td colspan=7> </td>
</tr>
<tr>
<td width="35"> <img src="images/spacer.gif" width=35 height=1 alt=""></td>
<td width="100"> <img src="images/spacer.gif" width=100 height=1 alt=""></td>
<td width="33"> <img src="images/spacer.gif" width=33 height=1 alt=""></td>
<td width="12"> <img src="images/spacer.gif" width=12 height=1 alt=""></td>
<td width="38"> <img src="images/spacer.gif" width=37 height=1 alt=""></td>
<td width="99"> <img src="images/spacer.gif" width=99 height=1 alt=""></td>
<td width="64"> <img src="images/spacer.gif" width=54 height=1 alt=""></td>
</tr>
</table>
<table width="70%" border="0" align="center">
<tr align="center">
<td width="51%" height="12"> </td>
<td width="49%" height="12"> </td>
</tr>
<tr align="center">
<td colspan="2"><img src="../Delphi_Logo.gif" width="397" height="77"></td>
</tr>
<tr align="center">
<td colspan="2"><font face="Arial, Helvetica, sans-serif" size="4"><font face="Georgia, Times New Roman, Times, serif"><font face="Arial, Helvetica, sans-serif" size="4"><font face="Georgia, Times New Roman, Times, serif"><font color="#CC9933" size="5"><font size="4" color="#000000" face="Arial, Helvetica, sans-serif">SINGAPORE
INTERNET PURCHASE</font></font></font></font></font></font></td>
</tr>
</table>
<table width="63%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr align="center">
<td><font face="Arial, Helvetica, sans-serif" size="4"><i><font face="Arial, Helvetica, sans-serif" color="#993333" size="2">(Please
log in your user name and password ) </font><font face="Georgia, Times New Roman, Times, serif" color="#993333"></font></i></font></td>
</tr>
<tr align="center">
<td> </td>
</tr>
<tr align="center">
<td><font face="Arial, Helvetica, sans-serif" size="2"><a href="ForgetPassword.asp">CLICK
HERE IF YOU FORGET YOUR PASSWORD</a></font></td>
</tr>
<tr align="center">
<td> </td>
</tr>
<tr align="center">
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="97">
<tr>
<td height="70"> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</BODY>
</HTML>
Did you check the browser's console? This is the error that Chrome reports:
Uncaught TypeError: Property 'forms' of object #<HTMLDocument> is not a function
Change this line:
var field = document.forms("Form1").item("txtUserID");
to be:
var field = document.forms["Form1"]["txtUserID"];
// or
var field = document.forms.Form1.txtUserID;
Or I would probably do this:
var field = document.getElementById("username");
I have got the solution
Changed
<td colspan=3> <img src="images/login_11.jpg" name="Image19" width="82" height="30" border="0" onClick="document.forms('Form1').submit()"></td>
To
<td colspan=3> <img src="images/login_11.jpg" name="Image19" width="82" height="30" border="0" onClick="document.forms[0].submit()"></td>

Categories