AmazingGrace
Programmer
Hi,
First: Here is the html I'm working with:
I've not been successful in determining the current page displayed in the XML-bounded table from in a javascript function. My goal is to enable/disable the four <INPUT> buttons based on the current page state. How can I determine this from a function, like in the UpdateBtns() call I put in the onClick event. For now it is just an empty function.
Any guidance is very much appreciated! I'm new DHTML so please understand I am quite very ignorant in this area.
First: Here is the html I'm working with:
Code:
<XML ID="Apps" src="Apps.xml"></XML>
<center>
<table datasrc="#Apps" datapagesize="5" id="tbl">
<thead>
<td>Department</td>
<td>Document Name</td>
<td>Status</td>
</thead>
<tr>
<td><div datafld="name"></div></td>
<td><div datafld="title"></div></td>
<td><div datafld="status"></div></td>
</tr>
</table>
<!-- Now I add buttons to change pages in the table -->
<input type="button" id="first" value="First" onclick="tbl.firstPage();UpdateBtns();">
<input type="button" id="prev" value="Previous" onclick="tbl.previousPage();UpdateBtns();">
<input type="button" id="next" value="Next" onclick="tbl.nextPage();UpdateBtns();">
<input type="button" id="last" value="Last" onclick="tbl.lastPage();UpdateBtns();">
I've not been successful in determining the current page displayed in the XML-bounded table from in a javascript function. My goal is to enable/disable the four <INPUT> buttons based on the current page state. How can I determine this from a function, like in the UpdateBtns() call I put in the onClick event. For now it is just an empty function.
Any guidance is very much appreciated! I'm new DHTML so please understand I am quite very ignorant in this area.