Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: REALLY dynamic tables
cpi
Junior Member

Posts: 2
Registered: 6/27/2006
Location: Spain
Member Is Offline
posted on 6/29/2006 at 05:15 AM Reply With Quote
REALLY dynamic tables


Why this don't work? How can i build REALLY dynamic tables on the fly?

Quote:
<html>
<head>
<title>Untitled</title>
<link rel="stylesheet" href="../css/table.css">
<script language="JavaScript" src="../js/table.js"></script>
<script language="JavaScript" src="../js/template.js"></script>
</head>
<script type="text/javascript">
var TABLE_CONTENT3;
var TABLE_CONTENT = [
['these are', 'top', 'frozen', 'cells'],
["copyright", "ABRAMOWICHM", 58, 665],
["copyright", "ADAMS", 67, 1558],
["dayz1_", "ADAMS", 88, 23746],
["rhit1s", "ADAMS", 74, 293772],
["kokain", "AGEEV", 67, 348304],
["agauth", "AGEEV", 48, 0],
["nab1", "AGEEV", 47, 0],
["dezmash", "AKONANDOJL", 123, 32780],
["sh_fivez", "AKONANDOJL", 69, 39215],
["sh_fneng", "AKONANDOJL", 71, 42557],
["sh_gar", "", 72, 38667],
["annotations", "AKSENOW", 52, 4282],
["apelxsin", "AKSENOW", 68, 234038],
["wanderer", "AMNUEL", 56, 36826],
["war_2029", "AMNUEL", 62, 21583],
["yes-no", "AMNUEL", 59, 38333],
["BytTrusom", "ANDERSON", 99, 51943],
["ChertogiMerfi", "ANDERSON", 109, 34111],
["DenPrichastiya", "ANDERSON", 61, 104965],
['these are', 'bottom', 'frozen', 'cells']
];

function change3(){
TABLE_CONTENT3 = '[';
for (i=0; i<=3; i++ ){
TABLE_CONTENT3 = TABLE_CONTENT3 + '[';
for (j=0; j<=3; j++ ){
TABLE_CONTENT3 = TABLE_CONTENT3 + i + j + ',';
}
if (i<3) TABLE_CONTENT3 = TABLE_CONTENT3 + '],';
else TABLE_CONTENT3 = TABLE_CONTENT3 + ']';
}
TABLE_CONTENT3 = TABLE_CONTENT3 + ']';

alert('TABLE_CONTENT3 = ' + TABLE_CONTENT3);

tabla.changeCont('TABLE_CONTENT3',6);
}
</script>

<body>
<p>Please, click 'change3' button... <br> Why this don't work? How can i build REALLY dynamic tables on the fly?</p>
<input type="button" name="change3" value="change3" onClick="change3()" />
<div id="query" style="border-width:thin; border-color:silver; border-style:groove;">
<SCRIPT LANGUAGE="JavaScript">
var tabla = new TTable(TABLE_CAPT, TABLE_CONTENT, TABLE_LOOK);
</SCRIPT>
</div>
</body>

</html>
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 9/14/2006 at 06:54 PM Reply With Quote

You generate TABLE_CONTENT3 as the string, it should be array. You can either change your code to generate it as the array or eval it.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Simple
XP-styled
3D designed
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004