var parry = new Array();
var error;
var string = new AW.Formats.String;
var money = new AW.Formats.Number;
money.setTextFormat( '$#,###.##' );
var c = new AW.HTTP.Request;
c.setURL( 'calculate.php' );
c.setParameter( 'session' , '<?= session_id() ?>' );
c.setRequestMethod( 'POST' );
c.response1 = c.response;
c.setAsync( false );
c.setParameter( 'month' , <?=$month?> );
c.response = function( data )
{
if( error = this.getResponseHeader( 'Error' ) )
alert( error );
else
{
this.response1( data );
alert('Your register has been updated.')
}
}
var table = new AW.XML.Table;
var prev;
var ishis;
var hascalc;
table.setURL( 'xml.php' );
table.setParameter( 'session' , '<?= session_id() ?>' );
table.setRequestMethod( 'POST' );
table.setAsync( false );
table.response1 = table.response;
table.setParameter( 'month' , <?=$month?> );
var uplast = false;
table.response = function( data )
{
if( error = this.getResponseHeader( 'Error' ) )
alert( error );
else
{
var thiscalc = <?=$hascalc?>;
/*
if( !thiscalc )
{
fresh();
return;
}
else
{
*/
prev = parseFloat( this.getResponseHeader( 'Prev' ) );
ishis = this.getResponseHeader( 'History' );
var income = this.getResponseHeader( 'Income' );
if( income > 0 )
{
$('moni').value = income;
$('moni').disabled = 'disabled';
}
obj.setRowCount( this.getResponseHeader( 'Rowcount' ) );
obj.setFooterText( ['', this.getResponseHeader( 'Newdate' ) , 'New Balance' , '' , '' , money.dataToText( this.getResponseHeader( 'Newbalance' ) ) ] );
this.response1( data );
//}
}
};
table.setData = function( value , col , row )
{
var node = this.getNode( col , row );
if( AW.ie )
node.text = value;
else
node.textContent = value;
}
var obj2 = new AW.UI.Grid;
This topic is archived.