KamikaziRunner
09-26-2005, 10:56 PM
Well, i have serveral tables generated with php and calling from an SQL database, which they work fine etc etc. Now i only want one table to display at a time. Heres the coding im trying. Right now im only dealing with 2 tables. But in the end, as more data is added to the database, it adds more tables, or pages, in this instant.
<table cellpadding=0 cellspacing=0 border=0 id="1" />
And below is buttons, well, are suppost to be, i cant get those working either...
<center>«<SPAN onClick="Pages(1,2)">1.</SPAN>
<SPAN onClick="Pages(2,2)">2</SPAN>»</center>
And my function
<script language="javascript">';
function Pages(number,tpages) {
var num = number
if (num == 1) {
document.getElementById(number).style.display = "";
document.getElementById(2).style.display = "none";
}
if (num == 2) {
document.getElementbyID(number).style.display = "";
document.getElementById(1).style.display = "";
}
}
</script>
Please some1 tell me why it doesnt work???
<table cellpadding=0 cellspacing=0 border=0 id="1" />
And below is buttons, well, are suppost to be, i cant get those working either...
<center>«<SPAN onClick="Pages(1,2)">1.</SPAN>
<SPAN onClick="Pages(2,2)">2</SPAN>»</center>
And my function
<script language="javascript">';
function Pages(number,tpages) {
var num = number
if (num == 1) {
document.getElementById(number).style.display = "";
document.getElementById(2).style.display = "none";
}
if (num == 2) {
document.getElementbyID(number).style.display = "";
document.getElementById(1).style.display = "";
}
}
</script>
Please some1 tell me why it doesnt work???