Find Amount Column in Table
removed: link to NumberFormat file directly
by phsiao2000
HTML
<html>
<head>
<link rel="stylesheet" href="https://s3.amazonaws.com/ultracartsbg/22000/71498/22000-cart-g.css">
<style type="text/css">
body {
margin : 0;
font-family :"Helvetica Neue", Helvetica, Arial, sans-serif;
font-size : 14px;
line-height : 20px;
color : #333333;
background-color : #ffffff;
}
#header-inner {
clear : both;
margin : auto;
height : 180px;
padding-top : 10px;
background : url(http://www.22000-tools.com/images/backgrounds/inner-header-bg.jpg) no-repeat center top;
}
#title-section {
width : 960px;
margin : 0 auto;
}
.page-title {
width : 600px;
float : left;
height : 100px;
margin : 23px 0 0 0;
}
#title-section h1 {
font-size : 48px;
color : #ebebeb;
}
#title-section h1 sub {
font-size : 17px;
color : #ebebeb;
font-style : italic;
line-height : 60px;
}
.title-icon {
float : left;
margin : 0 20px 0 0;
}
img[src$="spacer.gif"] {
height: 0;
}
#ucSingle {
margin-left : auto;
margin-right : auto;
width : 960px;
}
.ucTableHeaderBackground {
background-color : #f9f9f9;
}
#ShipTableLeft {
float : left;
margin : 4px 4px 20px 4px;
padding-left : 30px;
padding-top : 30px;
width : 400px;
}
#BelowShippingRight {
...
JavaScript
$('debug').highlight();
var table = $$('#ucViewCartTableId .ucInfoBoxBackground > tbody')[0];
//console.log(table);
//var tableHeaderTDs = $$('#ucViewCartTableId .ucInfoBoxBackground tbody tr.ucTableHeaderBackground');
var tableHeaderTR = table.getChildren('tr.ucTableHeaderBackground')[0];
//console.log(tableHeaderTR);
var quantityTD = tableHeaderTR.getChildren('span');
//console.log(quantityTD.outerHTML);
var quantityScripts = $$('td span > script:contains("document.write(nfFormat(")');
//console.log(quantityScripts);
quantityScripts.each(function(el, i) {
var td = el.getParent().getParent().setStyles({'text-align': 'right',
'padding-right': '20px'});
console.log(td);
});
var subTotalTR = table.getChildren('tr:last-child')[0];
var subTotalScript = subTotalTR.getChildren('td > script')[0];
console.log(subTotalScript);
var subTotalTD = subTotalScript.getParent().setStyles({'text-align': 'right',
'padding-right': '20px'});
//window.images = $$('img').set('src','');
//window.debug_inputs = $$('input[src^=/]').set('src','');
//window.debug_inputs.each(function(el, i){console.log (el.outerHTML);});
$$('[src^=/]').each(function (el, i) {
//el.removeProperty('src');
//console.log(el.outerHTML);
});
//debugger;
//console.log(images);