![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi, I am working with a table sorting script which can be found here http://www.workingwith.me.uk/article..._table_sorting This script works very nicely, but when there is a large amount of data to sort e.g > 200 then there is a slight delay in the table sort. To cater for this I want to provide some feedback to the user to inform them that the sort function is processing. My idea is to add a "sorting...." message to the top right of the page, much the same as the 'loading' message in gmail. To do this I am dynamically creating a div element and adding it to the document.body I do this as part of the onclick event that triggers the table sort. My problem is, eventhough I create and append the 'sorting...' element at the start of the onclick event (before the sorting is done), the element only gets added after the sorting is complete? I cant seem to get the 'sorting..' element to be added to the page while the sorting is in progress. Does javascript execute things in a sequence that prevents me adding my element to the page? Interestingly, I can execute a javascript alert and this gets displayed before the sorting begins.....why would document.body.appendChild(myDiv) not? Hopefully someone has come across this before and can help. I've added my HTML and javascript below. |
#2
| |||
| |||
|
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |