| | |
Table id
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
0
#3 31 Days Ago
javascript Syntax (Toggle Plain Text)
function getId() { var table = document.getElementById('your-table-id'); var rows = table.getElementsByTagName('tr'); var newId; if(rows && rows.length) { var lastRowId = rows[rows.length-1].id; newId = 'row' + parseInt(lastRowId.substring(lastRowId.indexOf('row')+1, lastRowId.lendth)) + 1; } else { newId = 'row0'; } return newId; }
When you think you have done a lot, then be ready for YOUR downfall.
![]() |
Similar Threads
- I have a problem in my table (PHP)
- Display Table From MySQL DB (C#)
- Dreamweaver MX - unwanted white table space at top (Graphics and Multimedia)
- Table of Contents Script (Java)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: CSS drop down menu problems
- Next Thread: What's the difference..?
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem checkbox child close column createrange() css cursor decimal dependent design disablefirebug dom download dropdown editor element embed engine error events explorer ext file form forms google gwt gxt hiddenvalue highlightedword hint html htmlform ie8 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jump libcurl listbox math media microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php player post problem progressbar regex runtime scroll search security select shopping size software sql text textarea unicode w3c web website window windowofwords windowsxp wysiwyg \n






