| | |
Table id
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
0
#3 Oct 22nd, 2009
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 ajaxhelp animate array automatically beta box bug calendar cart checkbox child class codes column createrange() css cursor date debugger decimal design disablefirebug dom download dropdown editor element engine enter error explorer file firefox focus forms frameworks getselection google gwt html htmlform ie8 iframe images index internet java javascript jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math menu microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent php player post problem programming progressbar prototype redirect regex runtime safari scale scriptlets scroll search select shopping size sql text textarea toggle w3c web website window windowofwords windowsxp wysiwyg \n






