JScript Runtime error:"document.body is null or not an object"

hello

I'v written a simple sort and paging method for datagrid control,
when i run the application, n when this sort function is called
the error message i get is :-

JScript Runtime error:"document.body is null or not an object"

plz help,...i could not get the error.:confused:
thnx
[328 byte] By [farhanh] at [2007-11-17 22:39:09]