- Joined
- Oct 26, 2008
- Messages
- 5,208
- Points
- 63
<table id="Table_01" style="" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td bgcolor="#b8d459" width="100%">Singapore Stock Market </td> <td bgcolor="#b8d459">
</td> </tr> <tr> <td height="13px">
</td> <td>
</td> <td>
</td> </tr> </tbody></table> <script type="text/javascript"> dojo.require("dojo.data.ItemFileWriteStore"); dojo.require("dojo.parser"); dojo.addOnLoad(function(){ loadgrid(); }); function loadgrid(){ jsonStore = new dojo.data.ItemFileWriteStore({url:noCache('/JsonRead/JsonData?qryId=SectorSummary&timeout=30')}); stockStore = new dojo.data.ItemFileWriteStore({url:noCache('/JsonRead/JsonData?qryId=SgxInfo&timeout=30')}); var changeSymbol = ""; var dateTime1 = ''; var volume = 0.000; var value = 0.000; var raise =0.000; var fall = 0.000; var unch = 0.000; stockStore.fetch({ query: {N:'SGX'}, onComplete:function(items, request){ if(items[0].C > 0){ changeSymbol ="+"; document.getElementById('img').innerHTML="▲"; document.getElementById('bstklast').style.color="green"; }else if((items[0].C < 0)){ document.getElementById('img').innerHTML="▼"; document.getElementById('bstklast').style.color="red"; } document.getElementById('bstklast').innerHTML=dF(items[0].LT-0); document.getElementById('bstkchange').innerHTML=changeSymbol+dF(items[0].C-0); document.getElementById('bstkvolume').innerHTML=dojo.number.format(items[0].VL); dateTime1 = stockStore._labelAttr; document.getElementById('gridDateLabelId').innerHTML = dateTime1; } }); jsonStore.fetch({ query: {OP:'1?'}, onComplete:function(items, request){ for(var i=0;i<items.length;i++){ volume = volume + parseFloat(items.VL); value = value + parseFloat(items.V); raise = raise + parseFloat(items.R); fall = fall + parseFloat(items.F); unch = unch + parseFloat(items.U); } document.getElementById('Sumbstkvolume').innerHTML = dojo.number.format((volume/1000000).toFixed(1))+'M' document.getElementById('Sumbstkvalue').innerHTML = '$'+dojo.number.format((value/1000000).toFixed(1))+'M' document.getElementById('GainersLosers').innerHTML = raise+"/"+fall; } }); } function dF(value){ if(value!=0) return(value.toFixed(3)); else return "-"; } function noCache(uri){return uri.concat(/\?/.test(uri)?"&":"?"," noCache=",(new Date).getTime(),".",Math.random()*1234567)}; function redirecToCompanyAll(stockcode){ createCookie('SGX_CO_ALL_STOCKCODE', stockcode , 60); if(stockcode.charAt(3)!='W') window.location.href="/wps/portal/marketplace/mp-en/listed_companies_info/company_all-in-one_info"; else window.location.href="/wps/portal/marketplace/mp-en/listed_companies_info/warrant_all-in-one_info"; } </script> <table style="border: 1px solid lightgray;" align="center" width="90%"> <tbody><tr> <td colspan="2" height="2">
</td> </tr> <tr height="16"> <td class="sgx_home_label" style="padding-left: 10px;">Volume:</td> <td class="header2 style3" style="padding-right: 10px;" align="right">1,173.9M</td> </tr> <tr height="16"> <td class="sgx_home_label" style="padding-left: 10px;">Value:</td> <td class="header2 style3" style="padding-right: 10px;" align="right">$1,209.9M</td> </tr> <tr height="16"> <td class="sgx_home_label" style="padding-left: 10px;">Gainers/Losers:</td> <td class="header2 style3" style="padding-right: 10px;" align="right">185/225</td> </tr> <tr> <td colspan="2" height="2">
</td> </tr> </tbody></table> <table align="center" width="90%"><tbody><tr> <td align="center" width="10%">▲</td> <td class="sgx_portlet_link_main" width="30%">SGX</td> <td class="header2 style3" width="20%">7.650</td> <td class="header2 style3" width="20%">+0.030</td> <td class="header2 style3" width="20%">1,483</td> </tr> <tr> <td colspan="4"> As at Tue 9 Mar 2010 05:05 PM</td></tr></tbody></table><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">
</td> </tr> <tr> <td height="13px">
</td> </tr> <tr height="16"> <td class="sgx_home_label" style="padding-left: 10px;">Volume:</td> <td class="header2 style3" style="padding-right: 10px;" align="right">1,173.9M</td> </tr> <tr height="16"> <td class="sgx_home_label" style="padding-left: 10px;">Value:</td> <td class="header2 style3" style="padding-right: 10px;" align="right">$1,209.9M</td> </tr> <tr height="16"> <td class="sgx_home_label" style="padding-left: 10px;">Gainers/Losers:</td> <td class="header2 style3" style="padding-right: 10px;" align="right">185/225</td> </tr> <tr> <td colspan="2" height="2">
</td> </tr> </tbody></table> <table align="center" width="90%"><tbody><tr> <td align="center" width="10%">▲</td> <td class="sgx_portlet_link_main" width="30%">SGX</td> <td class="header2 style3" width="20%">7.650</td> <td class="header2 style3" width="20%">+0.030</td> <td class="header2 style3" width="20%">1,483</td> </tr> <tr> <td colspan="4"> As at Tue 9 Mar 2010 05:05 PM</td></tr></tbody></table><input id="gwProxy" type="hidden"><!--Session data--><input onclick="jsCall();" id="jsProxy" type="hidden">