BigRed1212
Technical User
Hey.
I'm sure this is a timing thing, but I'm looking for a way to make it work.
I use this javascript to make tables sortable.
Easy. Highly recommended.
I have a page that presents the users a form with some selects, then executes an onChange function that makes an AJAX call to an ASP page that collects the user input and dumps some tabular output to the bottom half of the page. Works just fine.
What I want to do is have the tabular output returned by the ASP page be sortable using the above script.
I think there are timing issues.
If I put the script on the initial page and create a nondynamic table on the page from the get go, it is sortable and everything works fine. The returned table in the above example, however, is not sortable. This makes sense as the returned table doesn't exist when the original page is loaded.
I tried putting the sortable script in the ASP page returning the data thinking that would fire it but no joy.
Thoughts? How could I make a client side script see the ASP generated AJAX returned stuff? It isn't reloading so onLoad won't work.
The only other thing I can think of is maybe there is someway to have the return output write into the original DOM nodes of the original document, but that is deep water for me and I don't really know what I am talking about there.
I might be able to do something like write the column headings as anchors that make their own AJAX calls to sort the data, but that might get deep real quick as well and I'm not sure I want to do that in any event.
Ideas?
PS- I posted this almost word for word on another forum and got no responses, so I'm hoping Tek-Tips will impress me yet again.
I'm sure this is a timing thing, but I'm looking for a way to make it work.
I use this javascript to make tables sortable.
Easy. Highly recommended.
I have a page that presents the users a form with some selects, then executes an onChange function that makes an AJAX call to an ASP page that collects the user input and dumps some tabular output to the bottom half of the page. Works just fine.
What I want to do is have the tabular output returned by the ASP page be sortable using the above script.
I think there are timing issues.
If I put the script on the initial page and create a nondynamic table on the page from the get go, it is sortable and everything works fine. The returned table in the above example, however, is not sortable. This makes sense as the returned table doesn't exist when the original page is loaded.
I tried putting the sortable script in the ASP page returning the data thinking that would fire it but no joy.
Thoughts? How could I make a client side script see the ASP generated AJAX returned stuff? It isn't reloading so onLoad won't work.
The only other thing I can think of is maybe there is someway to have the return output write into the original DOM nodes of the original document, but that is deep water for me and I don't really know what I am talking about there.
I might be able to do something like write the column headings as anchors that make their own AJAX calls to sort the data, but that might get deep real quick as well and I'm not sure I want to do that in any event.
Ideas?
PS- I posted this almost word for word on another forum and got no responses, so I'm hoping Tek-Tips will impress me yet again.