Guest Srinivas Posted May 29, 2009 Report Share Posted May 29, 2009 I want to change the content in the tag of a HTML table and sort it by alphabets(A-Z) in a different HTML table usingJavaScript? Quote Link to comment Share on other sites More sharing options...
LSW Posted June 1, 2009 Report Share Posted June 1, 2009 Why not just do it in the SQL query when you get your data... easier and JS may not be supported by the user agent, but the A-Z will still be there. Quote Link to comment Share on other sites More sharing options...
BeeDev Posted June 2, 2009 Report Share Posted June 2, 2009 http://www.kryogenix.org/code/browser/sorttable/ http://yoast.com/articles/sortable-table/ Might be what you're looking for. JavaScript is supported on most browsers today so it's safe to assume at least 90% of your visitors can use this feature. The other 10% will have to live without a sorted table I guess. Quote Link to comment Share on other sites More sharing options...
LSW Posted June 2, 2009 Report Share Posted June 2, 2009 JavaScript is supported on most browsers today so it's safe to assume at least 90% of your visitors can use this feature. The other 10% will have to live without a sorted table I guess. Not if it is sorted within the SQL query and not with JavaScript. As for browser support... yes if all you look at is Browsers on computers then that is a correct assumption. If you consider the number of people using alternative user agents on alternative hardware like assitive technologies for the disabled, came consoles, game pads, cell phones etc. etc. then it is a very dangerous assumption and it is more like 10% that do support it. Why do something in a language not as widely supported as you think and that can be turned off if you can do it server side so it is send alphabetized already? Quote Link to comment Share on other sites More sharing options...
BeeDev Posted June 3, 2009 Report Share Posted June 3, 2009 (edited) You're right LSW, but I'm just answering his question, instead of suggesting him another way to do it. Maybe he wants to do it using Javascript, it's not mine or your decision to make. Maybe he's trying to implement this on a closed protected area that only certain people can access, which all use Javascript supported browsers. Maybe he's not designing his website to be accessed by Mobile phones or Games consoles. Edited June 3, 2009 by BeeDev Quote Link to comment Share on other sites More sharing options...
LSW Posted June 3, 2009 Report Share Posted June 3, 2009 Or maybe it is not being thought of... so I am arguing better ways of doing things so they can make an informed decision. No it is there decision, but they need as much info to make a good decision as possile. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.